Answers for "js textarea reset"

3

javascript clear text in textarea

// HTML
<textarea id='output' rows=20 cols=90></textarea>
<input type="button" value="Clear" onclick="javascript:eraseText();"> 

// JS
function eraseText() {
    document.getElementById("output").value = "";
}
Posted by: Guest on June-24-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language