Javascript examples for jQuery:Form Input
Prevent @ to be entered into input field
<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() { $(function() {/*from w w w.j a va 2 s. c o m*/ $(document).on('keypress', '[placeholder="x"]', function(event) { if(event.which === 64){ return false; } }); }) }); </script> </head> <body> <input type="text" placeholder="x"> </body> </html>