I. Finding ELEMENT nodes
1./* Basic Selector, find DOM object by id,class element */
class= "AA" >222</div>
Alert ($ ("#aa"). HTML ()); Alert ($ (". AA"). html ());
2./ * Hierarchy selector, find the P element in Div * /
<div><p>11</p></div> <div><p>22</p></div> <div> <p>33</p></div>
/* $ ("div>p"). html (); Find the P element in a div $ ("div p"). html (); Find the P element in a div
3./* filter selectors, such as finding the first and last elements in a Div, the child elements in the first Div, and the last child element */
<div>11</div> <div>22</div> <div>33</div> <div>44</ Div>
/ *alert ($ ("Div:first"). html ()); Alert ($ ("Div:last"). html ()); Alert ($ ("Div:first-child"). html ()); Alert ($ ("Div:last-child"). html ()); */
4./* form selector */
<input type= "Radio" name= "AA" id= "AA" value= ""/> <input type= "Radio" name= "AA" id= "AA" value= " /> <input type= "checkbox" Name= "BB" id= "BB" value= ""/> <select name= "AA" > <option value= "" > </option> </select>-->
/ *$ ("input:checked"). Val (); Gets all selected radio and check buttons for table cell $ ("select:selected"). Val (); Gets the value values selected in the drop-down menu * /
5. No need to select a list
<ul> <li>111</li> <li>222</li> <li>333</li> < Li>444</li> </ul>
Alert ($ ("ul Li:eq (1)"). text ());
Two
jquery section--Web effects time relationship not finished, waiting for update