Javascript, jquery, Ajax personal learning notes

Source: Internet
Author: User

This article aims to record the classic examples of my learning process

This section provides the complete JavaScript reference manual:

  • Javascript local objects and built-in objects
  • Browser object (BOM)
  • Html dom object
JavaScript Object Reference Manual

This reference manual describes the attributes and methods of each object and provides examples.

  • Array
  • Boolean
  • Date
  • Math
  • Number
  • String
  • Regexp
  • Global
Browser Object Reference Manual

This reference manual describes the attributes and methods of each object and provides examples.

  • Window
  • Navigator
  • Screen
  • History
  • Location
Html dom object reference manual

This reference manual describes the attributes and methods of each object and provides examples.

  • Document
  • Anchor
  • Area
  • Base
  • Body
  • Button
  • Canvas
  • Event
  • Form
  • Frame
  • Frameset
  • IFRAME
  • Image
  • Input button
  • Input checkbox
  • Input File
  • Input hidden
  • Input password
  • Input radio
  • Input Reset
  • Input submit
  • Input text
  • Link
  • Meta
  • Object
  • Option
  • Select
  • Style
  • Table
  • Tablecell
  • Tablerow
  • Textarea
Related Pages

To learn more about JavaScript objects, read the related content in the Javascript advanced tutorial:

  • Object-Oriented Technology
  • Object Application
  • Object Type
  • Object Scope
  • Define a class or object
  • Modify Object

For more information about Dom, visit the xml dom tutorial provided by w3school:

  • Xml dom tutorial
  • Xml dom reference manual

For more information about jquery, visit the jquery tutorial provided by w3school:

  • Jquery tutorial
  • Jquery Reference Manual

Note: jquery is a javascript library that greatly simplifies JavaScript programming.

Javascript

Online data: http://www.w3school.com.cn/js/index.asp

Regular Expression instance (determines whether the IP address is correct)

<SCRIPT type = "text/JavaScript"> var STR = "192.168.1.2" document. write (Str. match (/(\ D {1, 3} [.]) {3} \ D {1, 3}/g) // The match parameter must start and end with '/', and the last G indicates global match. </SCRIPT>

Jquery

Online data: http://www.w3school.com.cn/jquery/
Example 1.

Function switchmandatory (inputeltid, mode) {If ("On" = mode) {If (jquery ("#" + inputeltid + "> span "). size () = 0)/* is used to determine whether an ID exists */jquery ("#" + inputeltid ). append ("<SPAN class = 'field-mandatory '> * </span>");/* Add HTML code after an object */} else if ("off ") {jquery ("#" + inputeltid + "> span "). remove ();/* Delete the entire object */}}

Example 2. Use of validate

Jquery ("# phonehome "). validate ({expression: "",/* expression */message: ""/* messages printed when false */, check: true/* check when loading */});

Ajax online materials: http://www.w3school.com.cn/ajax/index.aspexample 1.
Jquery. ajax ({URL: _ controlpath + "storeandreload",/* specify URL */cache: false, data: {"store_id": ID, "rememberme": remembermechx, "istunnel": jquery ("istunnel "). val ()},/* specify the passed parameter */success: function () {/* Code executed after the specified URL is successfully called */If (remembermechx = 'on ') {setcookie ("Store", ID, days ,"/","",""); /* put the specified data in the cookie */} else {setcookie ("Store", "", 0 ,"/","","");} $ hidepopup (); var $ fieldidtoset = jquery ("# favo Uritestoreid "); if ($ fieldidtoset. Size ()! = 0) {$ fieldidtoset. val (ID); jquery ("# favouritestoremessagestorename" ).html (storename); jquery ("# favouritestoremessagenostore "). hide (); jquery ("# favouritestoremessagestorechose "). show ();} else {window. location. reload ();}}});

From: http://www.w3school.com.cn/js/js_reference.asp

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.