摘要: 一、四舍五入相关 1、toFixed()方法 需注意,保留两位小数,将数值类型的数据改变成了字符串类型 1 // 1.四舍五入 2 var num =2.446242342; 3 num = num.toFixed(2); 4 console.log(num); //2.45 5 console.l 阅读全文
posted @ 2021-12-14 14:09 曲琦 阅读(231) 评论(0) 推荐(0) 编辑