<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf8">
<script type="text/javascript">
window.onload=function(){
   var obtn=document.getElementById('btn');
   var oinput=document.getElementsByTagName('input');
   var i=0;
   obtn.onclick=function(){
	for(i=0;i<oinput.length;i++){   
	  if(oinput[i].checked==true){
	   oinput[i].checked=false;
	    }else{
          oinput[i].checked=true;
		}
	  }
   }
}   
</script>	


</head>
<body>
<p >全选</p>
<input type="checkbox"/><br/>
<input type="checkbox"/><br/>
<input type="checkbox"/><br/>
<input type="checkbox"/><br/>
<input type="checkbox"/><br/>
<input type="checkbox"/><br/>
<input type="checkbox"/><br/>
<input type="checkbox"/><br/>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-03-11
  • 2022-12-23
  • 2021-07-23
  • 2021-05-10
  • 2022-01-02
猜你喜欢
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
  • 2022-01-29
相关资源
相似解决方案