HTML DOM form Property
Complete Button Object Reference
Definition and Usage
The form property returns a reference to the form that contains the button.
This property returns a form object on success.
Syntax
Example
The following example returns the id of the form containing the button:
<html>
<body>
<form id="form1">
<input type="button" value="Click me!" id="button1" />
</form>
<p>The id of the form containing the button is:
<script type="text/javascript">
x=document.getElementById('button1');
document.write(x.form.id);
</script></p>
</body>
</html>
|
Try-It-Yourself Demos
Return
the id of the form containing the button
Complete Button Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|