function checkall() {
var flag = $("#checkFlag").attr("checked");//注意,在一些高版本的jQuery中,attr应该换成prop
if(flag) {
$("input[type='checkbox'][disabled=false]").each(function(){
$(this).attr("checked", true);
});
}else{
$("input[type='checkbox'][disabled=false]").each(function(){
$(this).attr("checked", false);
});
}
}
checkbox全选反选
最新推荐文章于 2021-12-23 10:18:27 发布