1 //上一页 2 function nextPager(href, pageindex, pagecount) { 3 4 if (pageindex > pagecount) { 5 pageindex = pagecount; 6 } else { 7 pageindex = pageindex + 1; 8 } 9 pager(href, pageindex); 10 } 11 //下一页 12 function upPager(href, pageindex) { 13 14 if (pageindex < 1) { 15 pageindex = 1; 16 } else { 17 pageindex = pageindex - 1; 18 } 19 pager(href, pageindex); 20 }
1 //通用分页click 2 function pager(href, pageindex) { 3 var _begintime = $("#g_begintime_hidden").val(); 4 var _endtime = $("#g_endtime_hidden").val(); 5 var _tiaojian = $("#g_tiaojian_hidden").val(); 6 g_loading(); 7 $("#gonghuolist").load(href, { pageindex: pageindex, beginTime: _begintime, endTime: _endtime, tiaojian: _tiaojian, state: $("#shenhezhuangtai_hidden").val() }, function () { 8 g_closeloading(); 9 }); 10 }
JS 通用分页
时间: 2024-10-18 02:24:56