📜  javascript 四舍五入 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:24.683000             🧑  作者: Mango

代码示例6
var totalAmount = 0;
totalAmount = Number($("#sub_amount").val()) + Number($("#vat_amount").val());
totalAmount = totalAmount.toFixed(2);
$('#total_amount').val(totalAmount);
//@sujay