Input Text formProperty
Examples
Return the id of the form containing the <input type="text"> element:
var x = document.getElementById("myText").form.id;
xThe output result is:
myForm
Try it Yourself »
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 property is read-only.
Browser Support
![]()
All major browsers support the form property.
Syntax
textObject.form
Technical Details
| Return Value: | A reference to the form element containing the text field. If the text field is not inside a form, it returns null. |
|---|
Input Text Object Other Extensions