html 复选框一键反选
来源:互联网 发布:centos 7 编辑:程序博客网 时间:2024/05/22 15:02
效果:
<!doctype html>
<html lang="en"><head>
<meta charset="UTF-8">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>一键反选</title>
<style>
*{margin:0px;padding:0px;}
form table{
width:500px;
margin:10px auto;
border-right:1px solid red;
border-bottom:1px solid red;
border-collapse:collapse;
}
tr td{
border-left:1px solid red;
border-top:1px solid red;
}
</style>
<script>
window.onload=function(){
var arrs = document.getElementsByClassName("checkbox");
if(arrs.length >0 ){
arrs[0].onclick=function(){
for(var i = 1; i < arrs.length; i++){
arrs[i].checked = !arrs[i].checked;
}
}
}
}
</script>
</head>
<body>
<form action="" method="post">
<table>
<tr>
<td width="20px"><input type="checkbox" class="checkbox"></td>
<td>123</td>
</tr>
<tr>
<td><input type="checkbox" class="checkbox"></td>
<td>123</td>
</tr>
<tr>
<td><input type="checkbox" class="checkbox"></td>
<td>123</td>
</tr>
</table>
</form>
</body>
</html>
0 0
- html 复选框一键反选
- HTML复选框
- html-----select 复选框
- 复选框取值.html
- html复选框
- html 复选框
- 复选框取值.html
- html复选框全选
- html自定义复选框
- html复选框
- HTML复选框--checkbox
- html复选框选中事件
- jquery实现HTML复选框变单选框
- HTML : CheckBox 复选框成组联动(JavaScript)
- 树形菜单复选框级联选择HTML
- HTML下拉框、文本框、复选框!
- HTML复选框和单选框 radio checkbox
- html复选框的全选的实现
- 从3000元月薪码农到首席架构师的经历
- RHEL6.5(POSTFIX+DOVECOT) 简单版
- 玩转树莓派-3_远程桌面连接
- 当Genymotion遇到AndroidStudio
- 手把手教你做智能LED灯(四) LED灯的外形结构
- html 复选框一键反选
- u-boot串口和stdio、console初始化及相关操作详解<二>
- 微服务要素-十二要素(The Twelve Factors)
- Windows环境下solrCloud 6.x的配置安装(单机模拟多服务器) - 配置IK-Analyzer分词器
- 单例模式
- 关于bootstrap中的Glyphicons 字体图标的知识点
- APK file does not exist on disk问题解决
- OpenStack——Neutron安装
- 简单的二级导航页面(纯css实现,运用display属性hover)