更新时间:2023-12-03 09:15:16
您可以使用单个选择器查找所有选中的复选框,并从中删除已检查属性。 jQuery将通过循环在内部执行此操作,但您不必自己编写循环:
You can use a single selector to find all the checked checkboxes, and remove the 'checked' attribute from them. jQuery will do this internally by looping, but you will not have to write a loop yourself:
$(':checkbox:checked').removeAttr('checked');
See the :checkbox
and :checked
selectors.