function formatFloat(value, pos){
return Math.round(value * Math.pow(10, pos)) / Math.pow(10, pos);
}
javascript保留小数
最新推荐文章于 2024-08-04 16:33:59 发布
function formatFloat(value, pos){
return Math.round(value * Math.pow(10, pos)) / Math.pow(10, pos);
}