Input Search typeProperty

Input Search 对象参考手册Input Search Object

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

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 对象参考手册Input Search Object Other Extensions