You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
843 B

  1. $(function () {
  2. "use strict";
  3. laypage({
  4. cont: "lr_page", //容器。值支持id名、原生dom对象,jquery对象。【如该容器为】:<div id="page1"></div>
  5. pages: 10, //通过后台拿到的总页数
  6. curr: 0, //当前页
  7. groups: 5, //连续显示分页数
  8. skip: true, //是否开启跳页
  9. first: '首页', //若不显示,设置false即可
  10. last: '尾页', //若不显示,设置false即可
  11. jump: function (obj, first) { //触发分页后的回调
  12. return;
  13. if (!first) { //点击跳页触发函数自身,并传递当前页:obj.curr
  14. pageIndex = obj.curr;
  15. pageQuery(pageIndex);
  16. document.getElementById('newlist').innerHTML = newsDate(data.rows);
  17. }
  18. }
  19. });
  20. });