摘要: //toFixed 四舍五入遇到坑。 1.235.toFixed(2) = 1.23 1.2350001.toFixed(2) = 1.24 //去尾法 Number.prototype.toFloor = function (num) { return Math.floor(this * Math.pow(10, num)) / Math.pow(10, num); }; //进一... 阅读全文
posted @ 2018-06-11 22:29 LIULIULIU666 阅读(4005) 评论(0) 推荐(0) 编辑