Search This Blog

Thursday, October 8, 2009

Restrict to number Input box using JQuery

We can use following JQuery code to allow only number in input box :


$('#inputId').bind('keypress', function(e) { return ( e.which!=8 && e.which!=0 && (e.which<48

e.which>57)) ? false : true ;})

1 comment:

Thanks for your comment, will revert as soon as we read it.

Popular Posts