Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
145
rated 0 times [  152] [ 7]  / answers: 1 / hits: 33731  / 14 Years ago, tue, october 26, 2010, 12:00:00

I have some price values to display in my page.



I am writing a function that takes the float price and returns the formatted currency value with currency code too.




like fnPrice(1001.01) should print $ 1,000.01.



More From » formatting

 Answers
57

You've got to do this by hand, there is nothing builtin into JS. For an example look at this post here: How can I format numbers as money in JavaScript?


[#95177] Friday, October 22, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
carolyn

Total Points: 618
Total Questions: 119
Total Answers: 86

Location: Saint Pierre and Miquelon
Member since Fri, Jan 28, 2022
2 Years ago
;