jquery判断复选框是否为空 1. [代码] [PHP]代码 //导出excel数据 $("#export").click(function () { if($(".list input[name='stuid[]']:checked").size()==0){ alert("请先勾选学生信息,再做导出操作!"); return false;
1. [代码][PHP]代码
//导出excel数据
$("#export").click(function () {
if($(".list input[name='stuid[]']:checked").size()==0){
alert("请先勾选学生信息,再做导出操作!");
return false;
} else {
$(".sendform").attr({action: "./export.php?do=export", method: "post"});
$('.sendform').submit();
}
});
