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();
}
βˆ‘ JS in Depth
XAH Β BUY NOW

JS in Depth

JS Obj Ref

DOM


DOM

Overview

Basic Examples

HTML Input

Web Scripting Examples

Web Scripting Misc

jQuery

node.js