HTML: Input Text Field

By Xah Lee. Date: . Last updated: .

Here is 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();
}
BUY
Ξ£JS
JavaScript in Depth

DOM Scripting

Overview

DOM Methods

Basic Examples

HTML Input

Web Scripting Examples

Web Scripting Misc