Node.js examples for HTML:Checkbox
Check all the checkboxes in the list
function checkAll(theForm) { // check all the checkboxes in the list for (var i=0;i<theForm.elements.length;i++) { var e = theForm.elements[i]; var eName = e.name; if (eName != 'allbox' && (e.type.indexOf("checkbox") == 0)) { e.checked = theForm.allbox.checked; }//ww w. j a v a2s .c o m } }