全选checkbox实例
来源:互联网 发布:ubuntu 打开anaconda 编辑:程序博客网 时间:2024/04/30 12:03
<body> <div> <input id="checkAll" type="checkbox" />全选 <input name="subBox" type="checkbox" />项1 <input name="subBox" type="checkbox" />项2 <input name="subBox" type="checkbox" />项3 <input name="subBox" type="checkbox" />项4 </div></body>
js的代码:
<script type="text/javascript">
$(function() {
$("#checkAll").click(function() {
$('input[name="subBox"]').attr("checked",this.checked);
});
var $subBox = $("input[name='subBox']");
$subBox.click(function(){
$("#checkAll").attr("checked",$subBox.length == $("input[name='subBox']:checked").length?true:false);
});
});
</script>
0 0
- 全选checkbox实例
- checkbox全选实例
- js 完成checkbox 全选与复选[实例]
- JQuery checkbox全选,反选实例
- checkbox全选
- checkbox全选
- checkbox全选
- checkbox 全选
- CheckBox全选
- checkbox全选
- checkbox 全选
- checkbox全选
- checkbox 全选
- checkbox全选
- checkbox 全选
- 全选(CHECKBOX)
- checkbox全选
- checkBox全选
- SAS9.1.3中文全功能版下载
- UIControl
- Linux下调整根目录的空间大小
- Ajax请求后页面刷新问题
- KSum问题
- 全选checkbox实例
- MySQL安装及基础使用
- AJAX 前后台数据交互
- HDU 2612
- 让ul中的li变成横向排列
- jquery.scrollLoading-min.js实现图片延迟加载
- cognos report studio 查询列的预排序
- 通过正则表达式 判断给定的字符串是不是符合要求
- 创建canvas