HTML | DOM Input Email value Property
The Input Email value property in HTML DOM is used to set or return the value of a value attribute of an email field. The value attribute specifies the initial value of the input Email Field. The value may be a single address or a list of addresses.
Syntax:
- It returns the Input Email value property.
emailObject.value
- It is used to set the Input Email value property.
emailObject.value = text
Property Value: It contains single value text which defines the single email address or a list of email addresses.
Return Value: It returns the string value which represent the valid email address of a user.
Example 1: This example illustrates how to return Input Email value property.
<!DOCTYPE html> <html> <head> <title> HTML DOM Input Email value Property </title> </head> <body style="text-align:center;"> <h1>GeeksforGeeks</h1> <h2>DOM Input Email value Property</h2> E-mail: <input type="email" id="email" name="myGeeks" value="careers@geeksforgeeks.org"> <br><br> <button onclick="myGeeks()"> Click Here! </button> <p id="GFG" style="font-size:20px;color:green;"></p> <!-- Script to return Input Email value Property --> <script> function myGeeks() { var em = document.getElementById("email").value; document.getElementById("GFG").innerHTML = em; } </script> </body> </html> |
Output:
Before Clicking the Button:

After Clicking the Button:

Example 2: This example illustrates how to set Input Email value property.
<!DOCTYPE html> <html> <head> <title> HTML DOM Input Email value Property </title> </head> <body style="text-align:center;"> <h1>GeeksforGeeks</h1> <h2>DOM Input Email value Property</h2> E-mail: <input type="email" id="email" name="myGeeks" value="careers@geeksforgeeks.org"> <br><br> <button onclick="myGeeks()"> Click Here! </button> <p id="GFG" style="font-size:20px;color:green;"></p> <!-- Script to set Input Email value Property --> <script> function myGeeks() { var em = document.getElementById("email").value ="manaschhabra22@gmail.com"; document.getElementById("GFG").innerHTML = em; } </script> </body> </html> |
Output:
Before Clicking the Button:

After Clicking the Button:

Supported Browsers: The browser supported by DOM input Email Value Property are listed below:
- Google Chrome
- Internet Explorer 10.0
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | DOM Input Email name Property
- HTML | DOM Input Email type Property
- HTML | DOM Input Email defaultValue Property
- HTML | DOM Input Email autofocus Property
- HTML | DOM Input Email disabled Property
- HTML | DOM Input Email Placeholder Property
- HTML | DOM Input Email size Property
- HTML | DOM Input Email autocomplete Property
- HTML | DOM Input Email maxLength Property
- HTML | DOM Input Email pattern Property
- HTML | DOM Input Email required Property
- HTML | DOM Input Email readOnly Property
- HTML | DOM Input Email form Property
- HTML | DOM Input Email multiple Property
- HTML | DOM Input Email Object
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



