全部不选中
$(".checkboxs").each(function(){
$(this).prop('checked', false);
});
全部选中
$(".checkboxs").each(function(){
$(this).prop('checked', false);
});
在layui窗口关闭时end中添加可以重置checkbox选中状态
本文介绍了一种使用jQuery来批量重置网页中所有checkbox选中状态的方法,通过遍历所有带有特定类名的checkbox元素并设置其选中属性为false,实现了在layui窗口关闭时统一取消所有复选框的选择。
全部不选中
$(".checkboxs").each(function(){
$(this).prop('checked', false);
});
全部选中
$(".checkboxs").each(function(){
$(this).prop('checked', false);
});
在layui窗口关闭时end中添加可以重置checkbox选中状态