摘要: 1 1、toFixed 2 var total = 12.345; 3 // 四舍五入,保留两位小数 4 var twoPoint = total.toFixed(2); // 括号中的num即为保留的位数 5 console.log(twopoint); // 12.35 6 7 但是,toFixe... 阅读全文
posted @ 2018-05-09 09:43 不落幕 阅读(857) 评论(0) 推荐(0) 编辑