标签:0.00 str oat ring style color span bsp nbsp
去掉数字格式结尾多余的零
JS:
parseFloat(3.04000)=3.04
parseFloat(001.900)=1.9
C#
(3.04000).ToString("0.##")=3.04
(001.900).ToString("0.##")=1.9
补充数字格式结尾需要的零
JS:
toDecimal2(3)=3.00
C#
(3.04).ToString("0.00000")=3.04000
(001.900).ToString("0.00000")=1.90000
标签:0.00 str oat ring style color span bsp nbsp
原文地址:http://www.cnblogs.com/kandyvip/p/6016163.html