<html>
<body>
<h3>A demonstration of how to access an Email field</h3>
E-mail: <input type="email" id="myEmail" value="john@example.com">
<p>Click the button to get the e-mail address of the email field.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myEmail").value;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>