HTML: Input Text Field

By Xah Lee. Date: . Last updated: .

Here's how to create a html text field input.


Result:
<div>
<label for="inputText09586">Name:</label>
<input id="inputText09586" type="text" size="20" maxlength="20" name="user_name" value="Jenny">
</div>

<br />

<div>
Result:
<span id="showBox30022"></span>
</div>
{
const inputText09586 = document. getElementById ('inputText09586');
const showBox30022 = document. getElementById ('showBox30022');

const f_update = (() => { showBox30022 .textContent = inputText09586.value; });

inputText09586 .addEventListener ('input', f_update, false);

f_update();
}

DOM How-To


Web Scripting Overview


HTML Input


Web Scripting Examples


Web Scripting Misc


jQuery


node.js

Like it? Help me by telling your friends. Or, Put $5 at patreon.

Or, Buy JavaScript in Depth

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

Web Dev Tutorials