有没有一种在 JavaScript 中格式化数字的简单方法,类似于 C#(或 VB.NET)中可用的格式化方法,通过 ToString("format_provider")
或 String.Format( )
?
最佳答案
一般
在 jQuery 中
- autoNumeric (一个体面的数字格式化程序和输入助手,支持 jQuery 1.5+ 的语言环境)
- jQuery Format (Java 的 SimpleDateFormat 和 NumberFormat 的客户端实现)
- jquery-numberformatter (number formatter with locale support)
关于javascript - 在类似于 C# 的 JavaScript 中格式化数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1068284/