Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Email type property

Input Email type property

Input Email Object Reference Input Email Object

Example

Return the form element type of the email field:

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

x

The output is:

email

Try it »


Definition and Usage

The type property returns the form type of the email field.

In input type="email", this property usually returns "email".


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type attribute.

Note: Internet Explorer 9 (and earlier IE versions) or Safari browser does not support the HTML element with type="email". .


Syntax

emailObject

.type

Technical Details

Return Value: String, representing the form element type of the email field

Input Email Object Reference Input Email Object