Input Text form property
Example
Return the form containing the element's form id:
var x = document.getElementById("myText").form.id;
x The output is:
myForm
Try it »
Definition and Usage
The form property returns a reference to the form object that contains the text field.
On success, this property returns the form object.
Note: This attribute is read-only.
Browser support

All major browsers support the form attribute
Syntax
textObject
.form
Technical details
| Return value: | A reference to the form element that contains the text field. Returns null if the text field is not inside a form. |
|---|
The Input Text object