Js保留两位小数

var num =2.0022222;

num = num.toFixed(2); // 输出结果为 2.00
posted @ 2021-01-14 09:51  柳仙慧子  阅读(41)  评论(0)    收藏  举报