Input Text form Property
Definition and Usage
form
The property returns a reference to the form containing the text field.
This property returns the form object on success.
Note:This property is read-only.
Example
Return the id of the form containing the <input type="text"> element:
var x = document.getElementById("myText").form.id;
Syntax
textObject.form
Technical details
Return value: |
Reference to the form element containing the text field. If the text field is not in the form, it returns |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |