http://jsfiddle.net/sushilbharwani/zWgNX/我想了解>選擇器我想知道爲什麼小提琴的大小是4. 2是我的想法。 3本來是possibilty但爲什麼4這個小提琴爲什麼會給出4的結果?
HTML:
<div class="ban_hdr">
<p>
Which of the following are correct? abc abc
<p>Test this code</p>
</p>
<p>Which of the following are correct? pqr pqr</p>
</div>
的jQuery:
alert($('div.ban_hdr > p').size());