How can I restrict input to a text-box so that it accepts only numbers and the decimal point?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
For anyone stumbling here like I did, here is a jQuery 1.10.2 version I wrote which is working very well for me albeit resource intensive:
Hope it will work for you.
This works fine.
Suppose your textbox field name is
Income
Call this validate method when you need to validate your field:
http://www.encodedna.com/2013/05/enter-only-numbers-using-jquery.htm
This really works!