HTML DOM form Property
Complete Select Object Reference
Definition and Usage
The form property returns a reference to the form that contains the dropdown list.
Syntax
Example
<html>
<body>
<form id="myForm">
<select id="mySelect">
<option>Apple</option>
<option>Pear</option>
<option>Banana</option>
<option>Orange</option>
</select>
</form>
<p>The id of the form is:
<script type="text/javascript">
document.write(document.getElementById("mySelect").form.id)
</script>
</p>
</body>
</html>
|
Try-It-Yourself Demos
Get the id of the form that contains the dropdown list
Complete Select Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|