当前位置: 首页 > Web前端 > HTML

自己做一个分页插件

时间:2023-04-02 21:13:00 HTML

PC分页,完美支持ie8+,下面2KB是见证奇迹穹顶的时刻地址https://github.com/cleartime/pageSize/blob/master/dome/index.htmlconfigurationdetailsvarconfig={el:document.getElementById("page"),//绑定到你的dompageCount:10,//总页数ps:如果最后两项都填了,这个字段会无效,pagesize:20,//每页显示的个数sizeCount:100,//总个数ps:pagesize和sizeCount必须同时存在pageA:1,//第一页和最后一页buttons不显示pageB:1,//上一页和下一页不显示pageC:1,//手动跳转不显示callback:function(res){//点击按钮销毁函数参数res表示当前页面console.log(res)},};新页面(配置);//start欢迎关注/star我的github:https://github.com/cleartime;我的博客:http://cleartime.leanapp.cn/;