标签: actionscript-3 flex flex4 flex3
如何使用Math.Round
代码:
txtTotal.text=Math.round((Number(txtRate.text)*Number(txtQuantity.text))).toString();
这里的比率是常数1.1,数量是可变的 即费率*数量= 1.1 *数量
答案 0 :(得分:4)
而不是.toString(),请使用.toFixed(2);
.toString()
.toFixed(2)