gpt4 book ai didi

javascript - 查找所有未选中的复选框

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:05:23 27 4
gpt4 key购买 nike

如果我想选择所有选中的复选框,我可以这样做。

$('#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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com