Input Email value property
Example
Modify the email address of the email field:
document.getElementById("myEmail").value = "steve@w3cschool.cc";
Try it »
Definition and Usage
The value property is used to set or return the value of the email field.
The value property 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 IE versions) or Safari browser does not support the HTML element with type="email". .
Syntax
Return the value attribute:
emailObject
.value
Set the value attribute:
emailObject
.value=
text
Attribute values
| Value | Description |
|---|---|
| text | Specify an email address, or a list of email addresses |
Technical Details
| Return Value: | String, the email list is separated by commas. |
|---|
More examples
Example
Get the email address of the email field:
var x = document.getElementById("myEmail").value;
x
The output is:
johndoe@example.com
Try it »
Related pages
HTML Reference Documentation: HTML value attribute
Input Email Object