1.HTML代码:
<p>one</p><div><p>two</p></div><p>three</p>
jQuery代码:$("div>p");结果 (A)
A.[<p>two</p>]
B.[<p>one</p>]
C.[<p>three</p>]
<div>DIV</div>
<span>SPAN</span>
<p>P</p>
jQuery代码:$("*") 结果(D)
A. [<div>DIV</div>]
B. [<span>SPAN</span>]
C. [<p>P</p>]
<div class="notMe">div class="notMe"</div>
<div class="myClass">div class="myClass"</div>
<span class="myClass">span class="myClass"</span>
jQuery代码:$(".myClass"); 结果:(D)
<div>DIV1</div>
<div>DIV2</div>
<span>SPAN</span>
jQuery代码: $("div");结果 (B)
<p class="myclass">p class="myClass"</p>
<span>span</span>
<p class="notMyClass">p class="notMyClass"</p>
jQuery代码是 $("div,span,p.myClass")
<p>one</p><div><p>two</p></div><p>three</p>
jQuery代码:$("div>p");结果 (A)
A.[<p>two</p>]
B.[<p>one</p>]
C.[<p>three</p>]
D.[<div><p>two</p></div>]
<div>DIV</div>
<span>SPAN</span>
<p>P</p>
jQuery代码:$("*") 结果(D)
A. [<div>DIV</div>]
B. [<span>SPAN</span>]
C. [<p>P</p>]
D. [<div>DIV</div>,<span>SPAN</span>,<p>P</p>]
<div class="notMe">div class="notMe"</div>
<div class="myClass">div class="myClass"</div>
<span class="myClass">span class="myClass"</span>
jQuery代码:$(".myClass"); 结果:(D)
[<div class="myClass">div class="myClass"</div>,<span class="myClass">span class="myClass"</span>]
<div>DIV1</div>
<div>DIV2</div>
<span>SPAN</span>
jQuery代码: $("div");结果 (B)
[<div>DIV1</div>,<div>DIV2</div>]
<p class="myclass">p class="myClass"</p>
<span>span</span>
<p class="notMyClass">p class="notMyClass"</p>
jQuery代码是 $("div,span,p.myClass")