Answers for "onclick remove textarea value"

0

onclick remove textarea value

<input type="button" value="Clear" onclick="javascript: functionName();" >
you just need to set the onclick event, call your desired function on this onclick event.

function functionName()
{
    $("#output").val("");
}
Above function will set the value of text area to empty string.
Posted by: Guest on March-19-2021
0

onclick remove textarea value

<textarea id='comments' rows='4' cols='4'></textarea>
<input type="button" value="Clear" onclick="javascript:document.getElementById('comments').value='';">
Posted by: Guest on March-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language