进行表格分页js
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
用户评论