js 取整

Math.ceil 向上取整
Math.floor 向下取整
Math.round 四舍五入

parseInt  直接去掉小数部分 取整
原文地址:https://www.cnblogs.com/rchao/p/14986753.html