Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Search type Property

Input Search type Property

Input Search Object Reference Input Search Object

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 Reference Input Search Object