Javascript examples for jQuery:Form Event
Limit key press using regex for input field
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.3.js"></script> <script type="text/javascript" src="http://brianjaeger.com/docs/limitkeypress/jquery.limitkeypress.js"></script> <script type="text/javascript"> $(window).load(function(){// ww w . j ava2s . c o m $('input').limitkeypress({ rexp: /^[A-Za-z]*$/ }); }); </script> </head> <body> <input> </body> </html>