jQuery 2 位小数并四舍五入

jQuery 2 decimal places and round up

有没有办法将数字舍入为:0.203 到 0.21

现在我这样做:

priceCurrent.toFixed(2);

您将此数字乘以 100,取 ceil 除以 100

console.log(Math.ceil(0.203*100)/100)