Javascript examples for jQuery:Form Textarea
Get value 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.8.3.js"></script> </head> <body> <textarea>Test Content</textarea> <script type="text/javascript"> $(document).ready(function () { var val = $.trim($("textarea").val()); if (val != "") { console.log(val); }/*from w w w .j a v a 2 s . com*/ }); </script> </body> </html>