金额保留两位小数,整数补0,不足两位补0
2023-01-06 本文已影响0人
洪锦一
保留两位小数
(Math.round(num*100)/100).toFixed(2);
保留三位小数
(Math.round(num*1000)/1000).toFixed(3);
保留两位小数
(Math.round(num*100)/100).toFixed(2);
保留三位小数
(Math.round(num*1000)/1000).toFixed(3);