多选全选jquery实现
来源:互联网 发布:htc windows mobile 编辑:程序博客网 时间:2024/06/06 10:48
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>多选反选</title>
- <script type="text/javascript" src="../js/jquery-1.4.2.js"></script>
- <script type="text/javascript">
- window.onload=function(){
- $("#yesorno").click(function(){
- $("input[name=sport]").attr("checked",$(this).attr("checked"));
- });
- $("#allselect").click(function(){
- $("input[name=sport]").attr("checked",true);
- });
- $("#nothingselect").click(function(){
- $("input[name=sport]").attr("checked",null);
- });
- $("#reverseselect").click(function(){
- $("input[name=sport]").each(function(){
- if($(this).attr("checked")){ //if(this.checked){
- $(this).attr("checked",null);
- }else{
- $(this).attr("checked",true);
- }
- });
- });
- };
- </script>
- </head>
- <body>
- <input type="checkbox" id="yesorno"/>全选/全不选 <br/>
- <input type="checkbox" name="sport" id="football" />足球
- <input type="checkbox" name="sport" id="basketball"/>蓝球
- <input type="checkbox" name="sport" id="volleyball"/>排球
- <input type="checkbox" name="sport" id="tennis"/>网球
- <br/>
- <input type="button" id="allselect" value="全选"/>
- <input type="button" id="nothingselect" value="全不选"/>
- <input type="button" id="reverseselect" value="反选"/>
- </body>
- </html>
0 0
- 多选全选jquery实现
- 多选全选jquery实现
- jquery实现全选/反选
- jquery实现全选反选
- jquery实现全选反选
- jquery实现全选、反选
- jQuery实现 全选/反选
- jQuery实现全选取消全选
- jQuery实现全选,全部选,反选
- jquery实现全选,反选,不选
- jQuery实现checkbox全选和反选
- Jquery实现全选反选功能
- JQuery 实现checkbox全选、反选、取消
- jquery实现全选、反选、全不选
- jQuery实现的全选、全不选、反选
- jquery实现全选、反选、全不选 .
- JQuery实现的 checkbox 全选、反选。
- jquery和js实现全选反选
- 在eclipse里面创建新项目,新建activity继承ActionBarAvtivity并报错。
- UIScrollView 循环滚动,代码超简单
- Google Analytics追踪记录
- Hibernate @Formula 攻略
- 最短路径算法—Bellman-Ford(贝尔曼-福特)算法分析与实现(C/C++)
- 多选全选jquery实现
- ActivateMQ安装以及使用
- Wampserver怎么用,Wampserver配置,Wampserver无法启动解决方法
- hdu 3763 二分
- 便捷开发工具(未完)
- linux 有名管道(FIFO)
- JS实现全景图效果360度旋转
- ntelliJ IDEA12的解决占用C盘C:\Users\Administrator
- 如何添加/usr/local/lib/的库文件