設置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);