去掉数字格式结尾多余的零,补充数字格式结尾需要的零
去掉数字格式结尾多余的零
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