Easy Tutorial
❮ Prop Audio Defaultmuted Prop Textarea Autofocus ❯

Input Search type Attribute

Input Search Object

Example

Return the form element type of the search field:

var x = document.getElementById("mySearch").type;

x output value is:

search

Definition and Usage

The type attribute returns the form type of the search field.

For search fields, this attribute usually returns "search".


Browser Support

All major browsers support the type attribute.


Syntax

Technical Details

| Return Value: | String, representing the form element type of the search field | | --- | --- |

❮ Prop Audio Defaultmuted Prop Textarea Autofocus ❯