type
type
This page has been flagged with the following issues:
High-level issues:
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
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.7
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
- HTML 4.01 Specification, Section 17.4
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)
HTMLInputElementinput type=buttoninput type=checkboxinput type=emailinput type=fileinput type=hiddeninput type=imageinput type=numberinput type=passwordinput type=rangeinput type=radioinput type=resetinput type=searchinput type=submitinput type=telinput type=textinput type=url
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here