【发布时间】:2023-03-04 02:55:01
【问题描述】:
我有以下功能:
function checktotal(){
total = currentproduct["priceperticket"] * $("#qtyselect").val();
$("span#totalprice").html("$"+total);
}
当它的总数为 65.50 时,它返回 65.5。
不知道是不是需要在.做一个length或者split然后加入一个0或者怎么办。
【问题讨论】:
标签: jquery math numbers dollar-sign