Input Search type Property
Example
Return the form element type of the search field:
var x = document.getElementById("mySearch").type;
x Output value:
search
Try it »
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