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.
标题几乎是不言自明的。我需要选择表单上的所有选择元素,除了那些具有“.notSelectable”类的元素
$('#yourform select').not('.notSelectable')
或者
$('#yourform select:not(.notSelectable)')
通常首选第一个。
尝试.not()方法
$("select").not('select.notSelectable');