Jquery中全选和反选的做法
2009-10-28 08:39
127 查看
<script type="text/javascript" src="js/jquery.js"/> <script type="text/javascript"> <!-- $(function() { $("#selectall").click(function() { $("input[name='chk']").each(function() { $(this).attr("checked", true); }); }); $("#deselectall").click(function() { $("input[name='chk']").each(function() { $(this).attr("checked", false); }); }); }); // --> </script>
<body> <input type='checkbox' id='in-shareuser-10' name='chk' value='10' />唱歌 <input type='checkbox' id='in-shareuser-11' name='chk' value='11' />跳舞 <input type='checkbox' id='in-shareuser-12' name='chk' value='12' />美术 <input type="button" id="selectall" name="selectall" value="全选" /> <input type="button" id="deselectall" name="deselectall" value="取消全选" /> </body>
相关文章推荐
- js及jQuery实现checkbox的全选、反选和全不选
- jQuery实现Checkbox中项目开发全选全不选的使用
- jQuery表格常用操作方法-增加,查询,删除,排序,移动,全选
- jQuery实现checkbox(复选框)选中、全选反选代码
- jquery实现的全选反选全不选等等的效果源码
- jQuery实现的全选、反选和不选功能
- jquery实现全选/反选
- jquery 1.9版本下复选框 全选/取消实现
- 用Jquery实现checkbox的 全选、全不选、反选
- jQuery实现复选框 全选、反选、全不选
- jquery checkbox全选、反选、选择基数、选择偶数
- jquery 实现复选框 全选/反选
- 使用jquery实现全选
- jQuery判断checkbox(复选框)是否被选中以及全选、反选实现代码
- JQuery实现全选、取消全选、反向选择
- jquery全选,jquery全不选,jquery反选
- yii,join l联查,及分页,最简单的jquery,全选反选,批删
- Jquery_Checkbox 完成全选,反选和全不选
- jQuery--checkbox全选/取消全选
- jQuery 全选效果实现代码