$("#allCheckbox").click(function() {
if ($(this).attr("checked")) {
$(":checkbox:not(#allCheckbox)").attr("checked", true);
} else {
$(":checkbox:not(#allCheckbox)").attr("checked", false);
}
});
回复
只能隐藏 不能删除 怎么做删除
$(":checkbox").each(function(index, element) {
if ($(this).attr("checked") == "checked") {
$(this).removeAttr("checked");
} else {
$(this).attr("checked", "checked");
}
});
回复