<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>实例015</title>
</head>
<body>
<form>
<label for="one"><input onclick="qx(this)" id="one" type="checkbox" >全选</label><br> <input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
<input type="checkbox" name="username[]" value="handsomehan">handsomehan<br>
</form>
<script>
var obj = document.getElementsByName("username[]"); function qx(o) {
for(var i = 0; i < obj.length; i ++) {
obj[i].checked = o.checked;
}
}
</script>
</body>
</html>

  

Example015实现html中checkbox的全选和反选(2)的更多相关文章

  1. jquery中checkbox的全选与反选

    <!DOCTYPE html><html><head> <meta charset="utf-8" /> <title> ...

  2. Exameple014实现html中checkbox的全选,反选和全不选(1)

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. js中checkbox的全选和反选的实现

    <head> <meta charset="utf-8"/> <script type="text/javascript"> ...

  4. jQuery checkbox的全选与反选

    1:checkbox的全选与反选 js 代码 $("#cbAll").click(function(){ if($("#cbAll").is(":ch ...

  5. 通过VBA实现checkbox的全选和反选

    checkbox的全选和反选可以通过VBA来控制,这种设计常见于一些交互式报表,代码如下: 1.分成两个IF判断 Private Sub CheckBox1_Click()  ‘checkbox为总控 ...

  6. checkbox的全选与反选

    最近在做一个项目,其中一个功能就是多选框的全选与反选.感觉很简单的小功能,一下子想不起来怎么实现了,很是耽误时间.我在想,我有必要整理下自己的一些小demo了,也方便以后再使用的时候能快速的完成功能. ...

  7. js及jQuery实现checkbox的全选、反选和全不选

    html代码: <label><input type="checkbox" id="all"/>全选</label> < ...

  8. Android中购物车的全选、反选、问题和计算价格

    此Demo主要解决的是购物车中的全选,反选计算价格和选中的条目个数的问题,当选中几条时,点击反选,会把当先选中的变为不选中,把不选中的变为选中.点击全选会全部选中,再次点击时,变为全部不选中. //- ...

  9. checkbox之全选和反选

    先导入jquery组件 <input type="checkbox" id="checkall">全选<input type="ch ...

随机推荐

  1. JDK源码之AQS源码剖析

    除特别注明外,本站所有文章均为原创,转载请注明地址 AbstractQueuedSynchronizer(AQS)是JDK中实现并发编程的核心,平时我们工作中经常用到的ReentrantLock,Co ...

  2. User-Agent详解

    User-Agent : 用户代理  用户在上网的时候会作为http 请求头的一部分传递给服务端 ,用于识别用户当前环境(如浏览器类型及版本号,以及操作系统信息 )  右键f12可以查看 下面是我的浏 ...

  3. Linux 安装USB摄像头

    sudo apt-get update sudo apt-get install fswebcam sudo apt-get install mplayer sudo apt-get install ...

  4. Git添加远程库和从远程库中获取(新手傻瓜式教学)

    一.    Git添加远程库 1.在本地新建一个文件夹,在该文件夹使用Git工具,运行$ git init,将该文件夹变为本地Git仓库,同时会生成一个隐藏的.git文件夹. 2.在该文件夹中用Not ...

  5. Ajax请求汇总(一)

    刚开始结束Ajax请求的时候,那真的是迷迷糊糊,昏天暗地,通过学习的深入和翻阅各种资料.求助度娘,总结一下Ajax请求,与大家分享一下,希望能给学习Ajax的同学一些帮助,废话不多手,直接开始~~~ ...

  6. [.NET跨平台]Jeuxs独立版本的便利与过程中的一些坑

    本文环境与前言 之前写过一篇相关的文章:在.NET Core之前,实现.Net跨平台之Mono+CentOS+Jexus初体验 当时的部署还是比较繁琐的,而且需要联网下载各种东西..有兴趣的可以看看, ...

  7. java设计模式面试考点

    分类(常见的设计模式) 1.创建型模式 a) 工厂模式 b) 抽象工厂模式 c) 单例模式 d) 建造者模式 2.结构型模式 a) 适配器模式 b) 装饰器模式 c) 桥接模式 d) 代理模式 3.行 ...

  8. Java之反射--练习

    定义Student 类:包含:姓名和年龄等属性,有参和无参构造方法,输出所有信息的方法 1.使用多种方法生成一个Student类的Class对象 2.使用Class类获取Student类的结构信息并输 ...

  9. 图表(Chart & Graph)你真的用对了吗?

    欢迎大家持续关注葡萄城控件技术团队博客,更多更好的原创文章尽在这里~~ 工作中,我们常常会遇到各式各样的数据,例如网站性能,销售业绩,客户服务 .营销活动等数据.对于这些数据,有哪些行之有效的方法来形 ...

  10. nodeJS实现简单网页爬虫功能

    前面的话 本文将使用nodeJS实现一个简单的网页爬虫功能 网页源码 使用http.get()方法获取网页源码,以hao123网站的头条页面为例 http://tuijian.hao123.com/h ...