JS截取数字

Math是javascript的一个内部对象,该对象的方法主要是一些数学计算方法
floor:下退 Math.floor(12.9999) = 12
ceil:上进 Math.ceil(12.1) = 13;
round: 四舍五入 Math.round(12.5) = 13  Math.round(12.4) = 12

 
posted @ 2019-04-26 14:26  JimmyShan  阅读(7843)  评论(0编辑  收藏  举报