1.floor(x)取小于等于数值x的最大整数 var a=10.42 Math.floor(a);//10 2.ceil(x) 取大于等于数值n的最小整数 var a=10.42 Math.ceil(a);//11