document.write(Math.round(-4.6) + "") document.write(Math.round(-4.5) + "") 为什么Math.round(-4.6)为-5??Math.round(-4.5)为-4??
收起
round是四舍五入 ceil/floor才是取整
报告相同问题?