/**
   * pageSize:每页加载数量 number
   * currentPage:当前页数 number
   * skipNum: 跳过数量
   * arr: 总数量
   * 适合一次加载所有数据的分页
   * 分页函数*/
  function ext_fenye (pageSize, currentPage,skipNum, arr) {
    var skipNum = (currentPage - 1) * pageSize;
    var newArr = (skipNum + pageSize >= arr.length) ? arr.slice(skipNum, arr.length) : arr.slice(skipNum, skipNum + pageSize);
    return newArr;
  }

扫描二维码,在手机上阅读!