0

I want to auto format a number that is being entered into an input box as currency. For example, if I enter 1023, then I want it to be formatted as 10.23, so the user has the option to enter the decimal. I would like this to happen while the user is in the input, so they do not have to leave the box for the change to occur. I have looked over SO and I know it has to be there, but I must not be using the right query to find it. Please point me in the right direction.

4

3 回答 3

3

I have used in autonumeric but there are lots of mask plugins, another I have used is this jquery currency plugin

$('#basic').currency();
于 2013-05-30T14:21:14.360 回答
0

you can use jquery plugin (masking) : http://igorescobar.github.io/jQuery-Mask-Plugin/

于 2013-05-30T14:21:27.747 回答
0

I use a js library in order to achive.

Take a look at it.

http://igorescobar.github.io/jQuery-Mask-Plugin/

于 2013-05-30T14:22:28.360 回答