Examples of the JavaScript get checkbox check box are countless, the following example, pure JS implementation of
var form = document.getElementById ("Form2");
var field = form.elements["Test2"];
var option = dining.getselectedoption (form, field);
var message = ""; for (var i = 0, len = option.length i < len; i++) {message = = "SELECT id:" + option[i].id + "\nselected Name:" + Opti
On[i].name + "\nselected value:" + option[i].value + "\ n";}
alert (message); /* Get the selected option * * Getselectedoption:function (Selectform, Selectionfield) {var result = []; var option = null; for (var i = 0; i < selectionfield.length;
i++) {option = Selectionfield[i]; if (option.checked) {result.push (option);}
return result; <form id= ' Form2 ' > <label> sort: </label><input id= ' aaaaa ' type= ' checkbox ' name= ' test2 ' value= ' 1 ' > <label for= ' aaaaa ' > Monthly sales </label><input id= ' bbbbb ' type= ' checkbox ' name= ' test2 ' value= ' 2 ' > < Label for= ' bbbbb ' > Score </label><input id= ' CCCCC ' type= ' checkbox ' name= ' test2 ' value= ' 3 ' > <label for= ' CCCCC ' > Offers </label> <br style= ' CLEAr:both ' ><label> Category: </label><input id= ' ddddd ' type= ' checkbox ' name= ' test2 ' value= ' 4 ' > <label For= ' DDDDD ' > Business package </label><input id= ' eeeee ' type= ' checkbox ' name= ' test2 ' value= ' 5 ' > <label for= ' Eeeee ' > Cold dish </label><input id= ' fffff ' type= ' checkbox ' name= ' test2 ' value= ' 6 ' > </form> ',