Is checked : CheckBox : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » CheckBox »

 

Is checked



<html>
<head>
<script language="JavaScript">
<!--
function cb1(f) {
  if (f.checked) {
     alert("Checkbox 1 is checked");
  }
}
function cb2(f) {
  if (f.checked) {
     alert("Checkbox 2 is checked");
  }
}
//-->
</script>
</head>
<body>
<form name="checkForm">
<input type="checkbox" checked name="c1" onClick="cb1(this.form.c1)">Item 1<br>
<input type="checkbox" name="c2" onClick="cb2(this.form.c2)">Item 2
</form>
</body>
</html>
 

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» CheckBox