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