function Money(num, price) {
var total = (num * price).toFixed(2);
console.log(total)
return total.toLocaleString();
}
Money(2,2)
function Money(num, price) {
var total = (num * price).toFixed(2);
console.log(total)
return total.toLocaleString();
}
Money(2,2)
本文标题:乘法运算 保留小数两位 做千分位
本文链接:https://www.haomeiwen.com/subject/howwxktx.html
网友评论