HTML: Email Field
This is for user to input a email address.
Email Address Input Example
Result:
Code
<label for="emailBox">Enter your email address:</label> <input type="email" id="emailBox" /> <p>Result: <span id="showBox"></span> </p>
{ const emailBox = document.getElementById("emailBox"); const showBox = document.getElementById("showBox"); const f_update = (() => { showBox.textContent = emailBox.value;}); emailBox.addEventListener ("input", f_update, false); }