标签:
1、四舍五入
(2.678).toFixed(2) // 2.68
2、不需要四舍五入
(parseInt(2.678*100)/100.0).toFixed(2) // 2.67
js 小数[非]四舍五入
原文地址:http://www.cnblogs.com/rdst/p/4721144.html