Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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 = "";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #clear #text #textarea
ADD COMMENT
Topic
Name
2+1 =