Tip: You can modify some of the code before running
<p> <meta charset= "utf-8"/><style type= "text/css" > Input {float:left;} </style></p> <script type= "Text/javascript" > Window.onload=function () {var oall= document.getElementById (' all '); var Ono=document.getelementbyid (' no '); var Ocontrary=document.getelementbyid (' contrary '); var Odiv=document.getelementbyid (' Div1 '); var aipt=odiv.getelementsbytagname (' input '); Oall.onclick=function () {for (Var i=0;i<aipt.length;i++) {aipt[i].checked=true; } }; Ono.onclick=function () {for (Var i=0;i<aipt.length;i++) {aipt[i].checked=false; } }; Ocontrary.onclick=function () {for (Var i=0;i<aipt.length;i++) {if (aipt[i].checked==false) {aipt[i].checked= True }else{Aipt[i].checked=false; } } }; }; </script> <div id= "Demo_main" ><!--put work here--> <div id= "Div1" ><input id= "All" type= "button" Value= "Select All"/> <input id= "No" type= "button" value= "Do not select"/> <inPut id= "Contrary" type= "button" value= "select"/> <input "checkbox" Type= "on" value=/> <input "checkbox" Val Ue= ' on '/> <input type= checkbox ' value= ' on '/> ' <input type= ' checkbox ' value= ' on '/> <input-type= ' check Box ' value= ' on '/> <input type= checkbox ' value= ' on '/> <input ' checkbox ' type= ' on ' value=/> type = "checkbox" value= "on"/></div> </div></td> </tr> </table>
Tip: You can modify some of the code before running