js 取整

Math.floor(num) :返回<=参数的最大整数.

Math.ceil(num);返回>=参数的最小整数.

Math.round(num);就是四舍五入
posted @ 2009-05-22 10:03  arix04  阅读(493)  评论(0编辑  收藏  举报