<Script language ="Javascript">
//Select all or not all
Function checkall (){
VaR ischecked = (document. testform. checkall. Checked = true );
VaR elements = Document. testform. elements;
VaR counter = elements. length;
For (I = 0; I <counter; I ++ ){
VaR element = elements [I];
If (element. type = "checkbox "){
Element. Checked = ischecked;
}
}
}
//YesCheckboxSelected
Function anybodychecked (){
VaR elements = Document. testform. elements;
VaR counter = elements. length;
For (I = 0; I <counter; I ++ ){
VaR element = elements [I];
If (element. Checked = true ){
Return true;
}
}
Return false;
}
</SCRIPT>
<Form name = "testform">
Select All:
<Input type = "checkbox" id = "checkall" onclick = "checkall ()"/>
Multiple choice box list:
<Input type = "checkbox" name = "checkbox" value = "1"/>
<Input type = "checkbox" name = "checkbox" value = "2"/>
<Input type = "checkbox" name = "checkbox" value = "3"/>
</Form>
// actual protection value {" 1 "," 2 ", "3"}
string [] checkboxs = request. getparametervalues ("checkbox");
// you don't need to write anything else, iterator just set the value .