Javascript examples for jQuery:Form Textarea
remove user input text from textarea
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> <script type="text/javascript"> $(window).load(function(){//from w w w.j ava2 s .co m $(document).ready(function() { $("input").click(function() { $("textarea")[0].innerHTML = ''; }); }); }); </script> </head> <body> <textarea> test test test test </textarea> <br> <input type="button" value="Clear"> </body> </html>