Input Email typeProperty

Input Email 对象参考手册Input Email Object

Examples

Return the form element type of the email field:

var x = document.getElementById("myEmail").type;
xThe output is:
email

Try it yourself »

Definition and Usage

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

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


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type property.

Note:Internet Explorer 9 (and earlier IE versions), or Safari browsers, do not support HTML <input> elements with type="email".


Syntax

emailObject.type

Technical Details

Return value: A string, representing the form element type of the email field


Input Email 对象参考手册Input Email Object Other Extensions