<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>Untitled Document</title><styletype= "Text/css"> </style></Head><Body><labelID= "BTN"><inputtype= "checkbox" />Select All</label><BR/><inputtype= "checkbox"/><BR/><inputtype= "checkbox"/><BR/><inputtype= "checkbox"/><BR/><inputtype= "checkbox"/><BR/><inputtype= "checkbox"/><BR/><inputtype= "checkbox"/><BR/></Body><Scripttype= "Text/javascript"> varobtn=document.getElementById ("btn"); varOinput=document.getElementsByTagName ("input"); Obtn.onclick=function(){ for(varx= 0; x<oinput.length;x++) {oinput[x].checked=true; } };</Script></HTML>
The
Gets the first input and binds the point-click event in that input, and when clicked, implements all of the following input with the For loop selected