Input Email valueProperty
Examples
Change the email address of the email field:
document.getElementById("myEmail").value = "steve@w3cschool.cc";
Try it Yourself »
Definition and Usage
The value property sets or returns the value of the value attribute of the email field.
The value property reflects the default value.
The value can be a single address or a list of email addresses.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the value property.
Note:Internet Explorer 9 (and earlier IE versions), or Safari, do not support HTML <input> elements with type="email".
Syntax
Return the value property:
emailObject.value
Set the value property:
emailObject.value=text
Property Values
| Value | Description |
|---|---|
| text | Specifies an email address, or a list of email addresses |
Technical Details
| Return Value: | A string, the list of email addresses separated by commas. |
|---|
More Examples
Example
Get the email address of the email field:
var x = document.getElementById("myEmail").value;
xThe output result is:johndoe@example.com
Try it Yourself »
Related Pages
HTML Reference:HTML <input> value Attribute
Other Extensions
Input Email Object