一个强大的jquery分页插件(转载)
这个分页插件使用方便,引用keleyidivpager.js和keleyidivpager.css文件,然后在htm(或者php,aspx,jsp等)页面中对分页总数,参数名,前缀后缀等进行设置就可以了
以下是源代码:
<!DOCTYPE html> <html> <head> <title>一个强大的jquery分页插件-柯乐义</title> <script type="text/javascript" src="http://keleyi.com/keleyi/pmedia/jquery/jquery-1.10.2.min.js"></script> <link href="http://keleyi.com/keleyi/phtml/jqtexiao/14/keleyidivpager.css" type="text/css" rel="Stylesheet" /> </head> <body> <div><h2>分页插件·柯乐义</h2><a href="http://keleyi.com/a/bjac/0xusjq8m.htm" target="_blank">原文</a></div> <script type="text/javascript" src="http://keleyi.com/keleyi/phtml/jqtexiao/14/keleyidivpager.js"></script> <div id="div_pager"> </div> <script type="text/javascript"> var totalPage = 20; var totalRecords = 390; var pageNo = getParameter('p'); //这里设置参数名(柯 乐 义 注 释) if (!pageNo) { pageNo = 1; } //生成分页控件 根据分页的形式在这里设置 kkpager.init({ pno: pageNo, //总页码 total: totalPage, //总数据条数 totalRecords: totalRecords, //链接前部 hrefFormer: 'keleyidivpager', //链接尾部 hrefLatter: '.htm', getLink: function (n) { return this.hrefFormer + this.hrefLatter + "?p=" + n; //参数名跟上面相同 } }); kkpager.generPageHtml(); </script> </body> </html>
相关推荐
EdwardSiCong 2020-11-23
85477104 2020-11-17
hhanbj 2020-11-17
81427005 2020-11-11
seoppt 2020-09-13
honeyth 2020-09-13
WRITEFORSHARE 2020-09-13
84483065 2020-09-11
momode 2020-09-11
85477104 2020-08-15
83510998 2020-08-08
82550495 2020-08-03
tthappyer 2020-08-03
84901334 2020-07-28
tthappyer 2020-07-25
TONIYH 2020-07-22
tztzyzyz 2020-07-20
83510998 2020-07-18
81463166 2020-07-17