//全选
function select_all() {
$('input[name="param"]').attr('checked','true');
}
//取消
function select_cancel() {
$('input[name="param"]').each(function () {
$(this).attr("checked",false);
})
}
//反选
function select_inv() {
$('input[name="param"]').each(function () {
$(this).attr("checked", !$(this).attr("checked"));
});
}
单一标签事件全选取消切换
$('#checkboxTitle').click(function(){
if($(this).is(':checked')){
$('input[name="checkboxList"]').each(function(){
$(this).prop('checked',true);
});
}
else{
$('input[name="checkboxList"]').each(function () {
$(this).removeAttr("checked");
})
}
});