HTML DOM Input Search type Property
HTML DOM Input Search type Property
Example
Return the form element type of the search field:
var x = document.getElementById("mySearch").type;
x output value:
search
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
The type property is supported by all major browsers.
Syntax
searchObject.type
Technical Details
| Return Value: | A string representing the form element type of the search field. |
|---|
YouTip