富贵资源网 Design By www.hznty.com
复制代码 代码如下:
<html>
<head>
<title>制作全选效果</title>
<script language="javascript">
function selectAll(){
allcheckBoxs=document.getElementsByName("a");
var a2=document.getElementsByName("a1");
if(a2[0].checked){
for(var i=0;i<allcheckBoxs.length;i++){
allcheckBoxs[i].checked = true;
}
}else{
for(var i=0;i<allcheckBoxs.length;i++){
allcheckBoxs[i].checked = false;
}
}
}
</script>
</head>
<body>
<form name="myform">
<table>
<tr><td colspan="2"><img src="/UploadFiles/2021-04-02/head.jpg"><tr>
<td><input type="checkbox" name="a1" onclick="selectAll()" />全选/全不选</td>
<td> <img src="/UploadFiles/2021-04-02/top.jpg"></tr>
<tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/one.jpg"><tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/two.jpg"><tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/three.jpg"><tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/four.jpg"></table>
</form>
</body>
</html>
<html>
<head>
<title>制作全选效果</title>
<script language="javascript">
function selectAll(){
allcheckBoxs=document.getElementsByName("a");
var a2=document.getElementsByName("a1");
if(a2[0].checked){
for(var i=0;i<allcheckBoxs.length;i++){
allcheckBoxs[i].checked = true;
}
}else{
for(var i=0;i<allcheckBoxs.length;i++){
allcheckBoxs[i].checked = false;
}
}
}
</script>
</head>
<body>
<form name="myform">
<table>
<tr><td colspan="2"><img src="/UploadFiles/2021-04-02/head.jpg"><tr>
<td><input type="checkbox" name="a1" onclick="selectAll()" />全选/全不选</td>
<td> <img src="/UploadFiles/2021-04-02/top.jpg"></tr>
<tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/one.jpg"><tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/two.jpg"><tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/three.jpg"><tr><td><input type="checkbox" name="a" /></td><td><img src="/UploadFiles/2021-04-02/four.jpg"></table>
</form>
</body>
</html>
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...