Javascript format numbers with custom string


When playing with Google for how to format numbers to custom string in JavaScript (like Microsoft numeric custom format string ), I found an excellent article by Xaprb.

for example :  111111 with format ###,###.00 will result as 111,111.00.

Current script support format of us ( use "," for thousand separating ), it's simple to replace "," by "." for "eu" format.

Try demo and visit above link if you're interested in this ;)

0 nhận xét:

 

Coding experience share Copyright © 2010 | Designed by Ipietoon for Free Blogger Template