2022年2月26日

js保留两位小数,不四舍五入

摘要: function formatDecimal(num, decimal) { num = num.toString() let index = num.indexOf('.') if (index !== -1) { num = num.substring(0, decimal + index + 阅读全文

posted @ 2022-02-26 09:54 妍若菲 阅读(588) 评论(0) 推荐(0) 编辑

导航