var a=3.5; a.toFixed(2); 结果为:3.50 toFixed方法的解释: toFixed() 方法可把 Number 四舍五入为指定小数位数的数字。 转载于:https://www.cnblogs.com/EleMMent/p/4133351.html