用X.toFixed(2)是5舍6入的, function xround(x, num){ return Math.round(x * Math.pow(10, num)) / Math.pow(10, num) ;} xround(X,2)这样才是四舍五入 Read More
posted @ 2017-07-19 11:37 小赖皮 Views(95) Comments(0) Diggs(0) Edit