; document.write(num.toFixed(2)); //显示2.00//示例2var num = 1 - 0.8; document.write(num); //显示结果 1.99999999995document.write(num.toFixed(2)); //2.00 相关文章: 2021-12-25 2021-08-29 2022-12-23 2021-12-10 2022-12-23 2021-07-19 2022-12-23