jQuery复选框全选和全选取消
jQuery(".salaryIds").each(function(){ if(jQuery("#salaryIds").attr("checked")=="checked"){ jQuery(".salaryIds").attr("checked","checked"); }else{ jQuery(".salaryIds").removeAttr("checked"); } console.log(jQuery(this).attr("checked")); });