js取整数、取余数的方法 2018-07-23 前端 暂无评论 1554 次阅读 丢弃小数部分,保留整数部分parseInt(5/2)向上取整,有小数就整数部分加1Math.ceil(5/2)四舍五入Math.round(5/2)向下取整Math.floor(5/2) - 阅读全文 -