一,样式中引用paging.css样式即可
二,dom结构如下:
<div id="pageTool"></div> <div id="pageToolbar"></div>
对应的相应js
<script type="text/javascript" src="../src/jquery-1.11.2.js"></script> <script type="text/javascript" src="../src/query.js"></script> <script type="text/javascript" src="../src/paging.js"></script> <script> $('#pageTool').Paging({pagesize:10,count:100,callback:function(page,size,count){ console.log(arguments) alert('当前第 ' +page +'页,每页 '+size+'条,总页数:'+count+'页') }}); $('#pageToolbar').Paging({pagesize:10,count:85,toolbar:true}); </script>