如何用jQuery检测复选框组是否全部未被勾选?
- 内容介绍
- 文章标签
- 相关推荐
本文共计77个文字,预计阅读时间需要1分钟。
使用jQuery判断复选框是否选中+1. [代码] [PHP] 代码 // 导出Excel数据 $(`#checkbox`).is(':checked')?
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(); } });
本文共计77个文字,预计阅读时间需要1分钟。
使用jQuery判断复选框是否选中+1. [代码] [PHP] 代码 // 导出Excel数据 $(`#checkbox`).is(':checked')?
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(); } });

