To utilise the following code you’ll need to be using jQuery 1.3+. The code sets an input field to only accept numerical characters. This has become our preferred “quick” method.
jQuery('input').live('keypress', function(e) {
return ( e.which!=8 && e.which!=0 && e.which!=46 && (e.which<48 || e.which>57)) ? false : true ;
})




