1. 首页
  2. 编程语言
  3. Javascript
  4. 进行表格分页js

进行表格分页js

上传者: 2021-04-22 15:37:07上传 JS文件 3.33KB 热度 26次
var sorter = new TINY.table.sorter("sorter"); sorter.head = "head"; sorter.asc = "asc"; sorter.desc = "desc"; sorter.even = "evenrow"; sorter.odd = "oddrow"; sorter.evensel = "evenselected"; sorter.oddsel = "oddselected"; sorter.paginate = true; //是否翻页 sorter.currentidPre = "currentpagePre"; //当前页数(前) sorter.limitidPre = "pagelimitPre"; // 总页数(前) sorter.currentidAfter = "currentpageAfter"; //当前页数(后) sorter.limitidAfter = "pagelimitAfter"; // 总页数(后) sorter.taxis = false; //是否排序 //默认显示行数5,10,20,30,50,100turnPage.js sorter.pagesize = 10; sorter.init("table"); sorter.size(5);//加这一句后页面初始化后就会分页了 /* var obj_table = document.getElementById("table"); if(obj_table!=null) { sorter.init("table"); sorter.size(20); } */ sorter.selectedPagePre = getElement("selectedPagePre");//控制每页行数(前) sorter.selectedPageAfter = getElement("selectedPageAfter");//控制每页行数(后) if(sorter.selectedPagePre != null){ for (i=0;i
用户评论