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.
在 jquery 中,如何选择所有没有 classA和 class的标签B。
A
B
您可以使用:not():
:not()
$(':not(.A.B)')
选择不具有 A 类和 B 类的所有元素。