First, the introduction of the jquery Library way
1 1 <!--introduced jquery-->2 2 <script type= "Text/javascript" src= "Scripts/jquery-1.3.1.js" > </script>3 3 <script type = "Text/javascript" >4 4 $ (document). Ready (function () {5 5 alert ("HelloWorld"6 6 }); 7 7 </script>
Second,jquery object/dom Object
1.jQuery objects are objects that are produced after wrapping a DOM object through JQuery ($ ())
2.jQuery objects are unique to jQuery. If an object is a jquery object, then it can use the method in jquery: $ ("#persontab"). html ();
3.jQuery objects cannot use any method of the DOM object, nor can the DOM object use any of the methods in JQuery
4. Convention: If you get a JQuery object, precede the variable with $.
-var $variable = JQuery Object
-var variable = DOM Object
Third,JQuery objects into DOM objects
jquery objects cannot use methods in the DOM, but if jquery does not encapsulate the desired method, it has to use the DOM object, as in the next two ways:
The 1.jQuery object is an array object, and the corresponding DOM object can be obtained by means of the [index] method.
-var $CR = $ ("#cr");
-var cr = $CR [0];
2. Use the Get (index) method in JQuery to get the corresponding DOM object
-var $CR = $ ("#cr");
-var cr = $cr. Get (0);
Iv.DOM objects into JQuery objects
For a DOM object, you can get a jquery object by wrapping the DOM object with $ () (the jquery object is the object that was created after wrapping the DOM object with jquery).
-var CR = document.getElementById ("Cr");
-var $CR = $ (CR);
Basic knowledge of JQuery