HTML DOM form Property
Complete Checkbox Object Reference
Definition and Usage
The form property returns a reference to the form that contains the checkbox.
This property returns a form object on success.
Syntax
Example
The following example returns the id of the form the checkbox belongs to:
<html>
<body>
<form id="form1">
<input type="checkbox" id="check1" />
</form>
<p>The form containing the checkbox is:
<script type="text/javascript">
x=document.getElementById('check1');
document.write(x.form.id);
</script></p>
</body>
</html>
|
Try-It-Yourself Demos
Get the
id of the form the checkbox belongs to
Complete Checkbox Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|