Input Search typeProperty
Examples
Return the form element type of the search field:
var x = document.getElementById("mySearch").type;
xThe output value is:
search
Try it Yourself »
Definition and Usage
The type property returns the form type of the search field.
For a search field, this property usually returns "search".
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the type property
Syntax
searchObject.type
Technical Details
| Return value: | A string representing the form element type of the search field |
|---|
Input Search Object Other Extensions