onclick remove textarea value

Solutions on MaxInterview for onclick remove textarea value by the best coders in the world

showing results for - "onclick remove textarea value"
Leonardo
09 Mar 2017
1<input type="button" value="Clear" onclick="javascript: functionName();" >
2you just need to set the onclick event, call your desired function on this onclick event.
3
4function functionName()
5{
6    $("#output").val("");
7}
8Above function will set the value of text area to empty string.
Atticus
25 Jun 2016
1<textarea id='comments' rows='4' cols='4'></textarea>
2<input type="button" value="Clear" onclick="javascript:document.getElementById('comments').value='';">