JS DOM: Textarea
What is Textarea
textarea tag is for user text input, such as for reader's comments.
Textarea Example
Result:
Code
<textarea id="text_XkDnF" rows="5" cols="40">type text here</textarea> <p>Result:<br /> <span id="output_GCDd3"></span></p>
{ const text_XkDnF = document.getElementById("text_XkDnF"); const output_GCDd3 = document.getElementById("output_GCDd3"); const f_update = (() => { output_GCDd3.textContent = text_XkDnF.value; }); text_XkDnF.addEventListener("input", f_update); f_update(); }