Javascript examples for DOM HTML Element:Input Email field
Input Email defaultValue Property - Get the default value of an email field:
<!DOCTYPE html> <html> <body> E-mail: <input type="email" id="myEmail" value="a@example.com"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w ww . jav a 2 s.c o m*/ var x = document.getElementById("myEmail").defaultValue; document.getElementById("demo").innerHTML = x; } </script> </body> </html>