Example015实现html中checkbox的全选和反选(2)
<!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)的更多相关文章
- jquery中checkbox的全选与反选
<!DOCTYPE html><html><head> <meta charset="utf-8" /> <title> ...
- Exameple014实现html中checkbox的全选,反选和全不选(1)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- js中checkbox的全选和反选的实现
<head> <meta charset="utf-8"/> <script type="text/javascript"> ...
- jQuery checkbox的全选与反选
1:checkbox的全选与反选 js 代码 $("#cbAll").click(function(){ if($("#cbAll").is(":ch ...
- 通过VBA实现checkbox的全选和反选
checkbox的全选和反选可以通过VBA来控制,这种设计常见于一些交互式报表,代码如下: 1.分成两个IF判断 Private Sub CheckBox1_Click() ‘checkbox为总控 ...
- checkbox的全选与反选
最近在做一个项目,其中一个功能就是多选框的全选与反选.感觉很简单的小功能,一下子想不起来怎么实现了,很是耽误时间.我在想,我有必要整理下自己的一些小demo了,也方便以后再使用的时候能快速的完成功能. ...
- js及jQuery实现checkbox的全选、反选和全不选
html代码: <label><input type="checkbox" id="all"/>全选</label> < ...
- Android中购物车的全选、反选、问题和计算价格
此Demo主要解决的是购物车中的全选,反选计算价格和选中的条目个数的问题,当选中几条时,点击反选,会把当先选中的变为不选中,把不选中的变为选中.点击全选会全部选中,再次点击时,变为全部不选中. //- ...
- checkbox之全选和反选
先导入jquery组件 <input type="checkbox" id="checkall">全选<input type="ch ...
随机推荐
- 连锁反应confirm
<script> function del(){ var flag = confirm("你真要删除么?"); if( flag ){ alert("我已被你 ...
- bitnami gitlab 配置域名
正常安装完成以后gitlab的代码仓库域名的地址依然是IP,这样不便于我们记忆,所以我想给gitlab增加一个域名 找到gitlab.yml 配置文件,在gitlab 节点下的host 由IP变更为域 ...
- Hibernate中调用带有underscore的Column Name
Hibernate中默认的NamingStrategy不支持调用带有下划线的column name.在hibernate的bean中必须使用camel case.使用ImprovedNamingStr ...
- swift学习 - 分类(Extensions)
在oc中为了增强已有类的功能,我们经常使用分类.使用分类,我们可以在不破坏原有类的结构的前提下,对原有类进行模块化的扩展. 但是在swift中没有分类这种写法了.相对应的是swift中只有扩展(Ext ...
- Kotlin入门第二课:集合操作
测试项目Github地址: KotlinForJava 前文传送: Kotlin入门第一课:从对比Java开始 初次尝试用Kotlin实现Android项目 1. 介绍 作为Kotlin入门的第二课, ...
- SharePoint 服务器端对象迁移文件夹
最近有个需求,写个定时迁移文件夹的小程序,因为计时器任务比较繁琐,所以选择了控制台程序.然后,用windows的计划任务执行,也许,会有广大朋友需要类似的功能,简单的分享一下代码逻辑,功能非常简单,希 ...
- 五、 创建连接串连接本地数据库(ASP.NET MVC5 系列)
1. 创建连接串连接本地SQLServer数据库 上节讲到MovieDBContext类,这个类的作用是连接数据库并将Movie对象迁移到数据库记录中.不过你会问一个问题:如何知道这个对象将连接哪个数 ...
- [原创]MongoDB_Sharding
Mongo Sharding:本示例搭建了三个副本集作为三个分片的sharding集群,其中master,slave,factershi三台同网段的内网主机.前期规划和原理分析省略,可根据具体配置推导 ...
- 同步中的四种锁synchronized、ReentrantLock、ReadWriteLock、StampedLock
目录 1.synchronized同步锁 2.ReentrantLock重入锁 3.ReadWriteLock读写锁 4.StampedLock戳锁(目前没找到合适的名字,先这么叫吧...) 5.总结 ...
- python内置的全局变量
print(__doc__) # 文件注释print(__file__) # 当前文件的绝对路径print(__package__) # 当前文件所在的包 当前文件: None 导入其他的文件:指定文 ...