این یه کد خیلی کاربردی برای غعال یا غیر فعال کردن همه چک باکس های موجود در فرم هست:

<SCRIPT LANGUAGE="JavaScript">
    function checkAll() {
    var theForm, z = 0;
    theForm = form_1;
    for(z=0; z<theForm.length;z++){
    if(theForm[z].type == 'checkbox'){
    theForm[z].checked = true;
    }
    }
    }
     
    function uncheckAll() {
    var theForm, z = 0;
    theForm = form_1;
    for(z=0; z<theForm.length;z++){
    if(theForm[z].type == 'checkbox'){
    theForm[z].checked = false;
    }
    }
    }
    </SCRIPT>