type

Jump to: navigation, search

type



Needs Summary: This article does not have a summary. Summaries give a brief overview of the topic and are automatically included on some listing pages that link to this article.


Applies to  ?

The type attribute specifies the type of <input> element to display.

The default type is: text.

Tip: This is not a required attribute, but we think you should always include it.

Examples

HTML

<form action="demo_form.asp">
Username: <input type="text" name="usrname">
<input type="submit" value="Submit"> </form>

Notes

Remarks

Only the type property is writeable. The type property is read/write-once, but only when an input element is created with the createElement method and before it is added to the document.

Syntax

Standards information

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related pages (MSDN)

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]