Easy Tutorial
❮ Jsref Decodeuricomponent Prop Track Index ❯

Input Email value Attribute

Input Email Object

Example

Modify the email address in the email field:

document.getElementById("myEmail").value = "[email protected]";

Definition and Usage

The value attribute is used to set or return the value of the email field.

The value attribute describes the default value.

The value can be a simple address or a list of email addresses.


Browser Support

All major browsers support the value attribute.

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


Syntax

Return the value attribute:

Set the value attribute:

Attribute Values

Value Description
text Specifies an email address or a list of email addresses

Technical Details

| Return Value: | String, a list of emails separated by commas | | --- | --- |


More Examples

Example

Get the email address from the email field:

var x = document.getElementById("myEmail").value;
[email protected]

Related Pages

HTML Reference: HTML <input> value Attribute


Input Email Object

❮ Jsref Decodeuricomponent Prop Track Index ❯