如果我想选择所有选中的复选框,我可以这样做。
$('#mydiv input[type=checkbox]:checked')
是否有类似的简单语法可以让我选择所有未选中的复选框?
最佳答案
嗨,是的:演示 http://jsfiddle.net/usvrb/
http://api.jquery.com/not-selector/
引用
The .not() method will end up providing you with more readable selections than pushing complex selectors or variables into a :not()
selector filter. In most cases, it is a better choice.
希望这有帮助,:) 干杯!
关于javascript - 查找所有未选中的复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10150104/