Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
大于号 ( >) 在这里有什么不同?
>
是$('#someElement').find(">[someAttribute]")一样的$('#someElement').find("[someAttribute]")吗?
$('#someElement').find(">[someAttribute]")
$('#someElement').find("[someAttribute]")
否:它只选择一个元素,如果它是 . 的直接子元素#someElement。
#someElement
它在语义上基于 CSS 直接子选择器。
查看子选择器的文档