HTML: Email Field

By Xah Lee. Date: . Last updated: .

This is for user to input a email address.


<label for="emailBox">Enter your email address:</label>
<input type="email" id="emailBox" />

<span id="showBox"></span>
const emailBox = document. getElementById("emailBox");
const showBox = document. getElementById("showBox");

const f_update = (() => { showBox.textContent = emailBox.value;});

emailBox.addEventListener ("input", f_update , false);

DOM How-To

Web Scripting Overview

HTML Input

Web Scripting Examples

Web Scripting Misc



If you have a question, put $5 at patreon and message me.

Web Dev Tutorials