tofixed在不同的浏览器中给出结果不一致

时间:2014-11-19 10:20:32

标签: javascript google-chrome browser mozilla rounding

var num = 20.025;
num.toFixed(2) - In mozila and chrome gives 20.02
num.toFixed(2) - In IE gives - 20.03 - which is correct.

如何在其他浏览器中获得与IE相同的值。请建议

0 个答案:

没有答案