设置name为schoolId的复选框组全部选中

$("input[name='schoolId']").iCheck('check');$("input:checkbox[name='schoolId']").iCheck('check');设置name为schoolId的复选框组全部取消选中方法一(推荐)

$("input[name='schoolId']").iCheck('uncheck');$("input:checkbox[name='schoolId']").iCheck('uncheck');设置name为schoolId的复选框组全部取消选中方法二(推荐)

$("input:checkbox[name='school']").removeAttr("checked");获取name为school的复选框组中被选中的项的值

var schoolValue = ""; $('#billPkg input[name="school"]:checked').each(function(){ schoolValue = $(this).val(); if (schoolValue != '') { schoolValue += schoolValue + ","; }});schoolValue = schoolValue.substr(0, schoolValue.length-1);