The way jquery takes objects
$ (' #id '): Through the ID of the element
$ (' TagName '): Through the label name of the element
$ (' TagName tagName '): By the label name of the element, eg: $ (' ul Li ')
$ (' Tagname#id): ID and label signature of element
$ (': CheckBox '): Takes all elements of the input type checkbox ':
Eg:
<input type= "checkbox" Name= "appetizers"
value= "Imperial"/>
$ (' span[price] input[type=text] ') : Fetch the following INPUT element
<span price= "3" >
<input type= "text" name= "imperial.quantity" disabled=
" Disabled "value=" 1 "/>
</span>
$ (' div ', $ (this). Parents (' Div:first ')) : Take the first div node of the DIV (at least the parent node)
$ (' ~ Span:first ', this): Locates the "a" and "s", "a <span> element.
Delay Loading JS file:
$.getscript
Example:
HTML file:
Java code
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD" >
JS file:
Java code
Alert ("I ' m inline!");
var somevariable = ' Value of somevariable ';
function SomeFunction (value) {
alert (value);
}
function test () {
alert (' Test ');
}
Alert ("I ' m inline!");
var somevariable = ' Value of somevariable ';
function SomeFunction (value) {
alert (value);
}
function test () {
alert (' Test ');
}
jquery Array Processing:
Java code
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD" >
Above this jquery traversal array each method is a small series to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.