js中的除法

最近做了一个分页的用户控件,使用到了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中的全部数量;

 

posted @ 2016-03-31 10:13  冲破天窗  阅读(12816)  评论(0编辑  收藏  举报