|
NUmber formatting in the form $1,234,567.89
Hi,
can u plz help me to get the below requirement....
initially my text box contains the the value $0.00,and user can enter a maximum of 9 digits
when user enters the input the output should be inthe form as shown below.
initial | userInput | OutPUt
$0.00 1 -> $0.01
$0.00 12 -> $0.12
$0.00 123 -> $1.23
$0.00 1234 -> $12.34
$0.00 12345 -> $123.45
$0.00 123456 -> $1,234.56
$0.00 1234567 -> $12,345.67
$0.00 12345678 -> $123,346.78
$0.00 123456789 -> $1,234,567.89
$0.00 .(dot as input) $0.00
$0.00 .1 $0.10
$0.00 .11 $0.11
once dot is entered in the text box maximum of 2 digits can be entered follwing the dot.
dot should be accepted only when there is space for two digits.
thnx
Murali.
|