<ul id="aaa"> <li>aaa</li> <li>aaa <ul> <li>bbb</li> <li>bbb</li> </ul> </li> <li>aaa</li> </ul>
$('#aaa > li')就只会取到第一层的li,内层的li就不会取到
<ul id="aaa"> <li>aaa</li> <li>aaa <ul> <li>bbb</li> <li>bbb</li> </ul> </li> <li>aaa</li> </ul>
$('#aaa > li')就只会取到第一层的li,内层的li就不会取到
转载于:https://www.cnblogs.com/henuyuxiang/p/7423938.html