【发布时间】:2021-08-19 12:32:40
【问题描述】:
我需要让这些输出产生一个整数而不是小数
{
outputs[0].textContent = value / 0.7;
outputs[1].textContent = value * 1;
outputs[2].textContent = value / 0.7 - (value / 0.7 / 100*40);
outputs[3].textContent = value * 1;
outputs[4].textContent = value / 0.7 - (value / 0.7 / 100*20);
outputs[5].textContent = value / 0.7 - (value / 0.7 / 100*10);
}
【问题讨论】:
-
parseInt或toFixed
标签: javascript rounding calculator