The HTML INPUT tag, with "checkbox" as the value of the TYPE attribute. For a given form, the JavaScript runtime engine creates appropriate Checkbox objects and puts these objects in the elements array of the corresponding Form object.
Code:
function checkCheckBoxes() {
if (document.frmTest.CHKBOX_1.checked == false &&
document.frmTest.CHKBOX_2.checked == false &&
document.frmTest.CHKBOX_3.checked == false)
{
alert ('You didn\'t choose any of the checkboxes!');
return false;
}
else
{
return true;
}
}
Bookmarks