YouTip LogoYouTip

Prop Search Type

HTML DOM Input Search type Property

HTML DOM Input Search type Property

HTML DOM 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 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

Internet Explorer Firefox Opera Google Chrome Safari

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.

← Python3 InputoutputProp Search Size β†’