首页 > Web开发 > 详细

js中的除法

时间:2016-03-31 10:43:06      阅读:205      评论:0      收藏:0      [点我收藏+]

最近做了一个分页的用户控件,使用到了js中的除法。整理如下。

Math.ceil();向上舍入,比如Math.ceil(3/2)=2;

Math.floor();向下舍入,比如Math.floor(3/2)=1;

Math.round();四舍五入,比如Math.round(3/2)=2;Math.round(5/2)=2;

 

同时也用到了ExtJs中对获取Store中的一些方法:

 App.Store1.pageSize;获取当前Store中的页面大小;

 App.Store1.currentPage;获取当前Store中的当前页码;

App.Store1.totalCount;获取当前Store中的全部数量;

 

js中的除法

原文:http://www.cnblogs.com/zhangqi0924/p/5340078.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!