Javascript examples for DOM HTML Element:Input Email field
Input Email value Property - Get the email address 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 w w . j av a2 s .c o m*/ var x = document.getElementById("myEmail").value; document.getElementById("demo").innerHTML = x; } </script> </body> </html>