HTML DOM form Property
Complete Submit Object Reference
Definition and Usage
The form property returns a reference to the form that contains the submit button.
This property returns a form object on success.
Syntax
Example
The following example returns the id of the form containing the submit button:
<html>
<body>
<form id="form1">
<input type="submit" id="submit1" />
</form>
<p>The id of the form containing the submit button is:
<script type="text/javascript">
x=document.getElementById('submit1');
document.write(x.form.id);
</script></p>
</body>
</html>
|
Try-It-Yourself Demos
Return
the id of the form containing the submit button
Complete Submit Object Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|