YouTip LogoYouTip

Prop Email Value

HTML DOM Input Email value Property

HTML DOM Input Email value Property

-- Learning not just technology, but dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

<input> - datetime-local

HTML DOM FileUpload Object

Input Email value Property

Input Email Object Reference Input Email Object

Example

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 an email field.

The value property describes the default value.

The value can be a simple email address, or a list of email addresses separated by commas.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

The value property is supported in all major browsers.

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


Syntax

Return the value property:

emailObject.value

Set the value property:

emailObject.value=text

Property Values

Value Description
text Specifies the email address, or a list of email addresses

Technical Details

Return Value: A String, representing a comma-separated list of email addresses.

More Examples

Example

Get the email address of the email field:

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

The value of x will be:

johndoe@example.com

Try it yourself Β»


Related Pages

HTML reference: HTML <input> value attribute


Input Email Object Reference Input Email Object

<input> - datetime-local

HTML DOM FileUpload Object

ByteDance Coding Plan supports Doubao, GLM, DeepSeek, Kimi, MiniMax and other mainstream large models, officially supplied, stable and reliable. Configuration Guide Β₯9.9/ month Subscribe Now

← Dom Obj Input ImageProp Email Type β†’