Number#toFixed()
对于某些号码无法正常工作。 如: -`toFixed()`对于某些号码无法正常工作
7.795.toFixed(2)
//-> 7.79 #Instead it should display 7.80
8.895.toFixed(2)
//-> 8.89 #Instead it should display 8.90
1.105.toFixed(2)
//-> 1.10 #Instead it should display 1.11
55.305.toFixed(2)
//-> 55.30 #Instead it should display 55.31
请为我提供了一个解决这个问题。
'toFixed()'是Javascript方法 - 无关的jQuery – ManseUK