Input Search formProperty
Example
Return the id of the form that contains the <input type="search"> element:
var x = document.getElementById("mySearch").form.id;
xThe output result is:myForm
Try it yourself »
Definition and Usage
The form property returns a reference to the form that contains the search 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
searchObject.form
Technical Details
| Return Value: | A reference to the form element that contains the search field. If the search field is not in a form, returns null. |
|---|
Input Search Object Other Extensions