/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('input.valid-number').bind('keypress', function(e) { return ( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57)) ? false : true ; })