js-数字操作 发表于 2018-05-02 分类于 前端 阅读次数: 本文字数: 89 阅读时长 ≈ 1 分钟 取整parseInt(5/2)//向上取整,有小数,则整数部分加1Math.ceil(5/2)//四舍五入Math.round(5/2)//向下取整Math.floor(5/2)