Javascript examples for jQuery:Form Textarea
Using Regex to allow disallow text in textarea
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> <script type="text/javascript"> $(window).on('load', function() { $('#textbox').keyup(function (e) { this.value = this.value.replace(/[^a-z0-9]/ig, ''); });// w w w .ja v a 2s . c o m }); </script> </head> <body> <textarea id="textbox"></textarea> </body> </html>