Share this page 

Check and Uncheck a checkboxTag(s): Language


<SCRIPT>
function checkAll(check) {
   for (i=0;i<6;i++) {
     if (check) {
        document.forms['thisone'].chbx[i].checked=true;
        }
     else {
        document.forms['thisone'].chbx[i].checked=false;
        }
     }
   }
</SCRIPT>
<FORM id="thisone">
<INPUT TYPE=checkbox NAME="chbx">
<INPUT TYPE=checkbox NAME="chbx">
<INPUT TYPE=checkbox NAME="chbx">
<INPUT TYPE=checkbox NAME="chbx">
<INPUT TYPE=checkbox NAME="chbx">
<INPUT TYPE=checkbox NAME="chbx">
<INPUT TYPE=button   NAME="btnCheck" VALUE="check All"
    onClick="checkAll(true)">
<INPUT TYPE=button   NAME="btnCheck" VALUE="unCheck All"
    onClick="checkAll(false)">

</FORM>

Try it :


Note :The visual is a little bit different of a plain-html rendering because of the framework used to build this site!