HTML DOM id Property
Complete Checkbox Object Reference
Definition and Usage
The id property sets or returns the id of a checkbox.
Syntax
Example
The following example prints the id of the checkbox:
<html>
<body>
<form>
<input type="checkbox" id="check1" />
</form>
<p>The id of the checkbox is:
<script type="text/javascript">
document.write(document.getElementById("check1").id)
</script>
</p>
</body>
</html>
|
Try-It-Yourself Demos
Get the id
of a checkbox
Complete Checkbox Object Reference
|