clear textarea code example
Example: 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 = "";
}