{"id":16260600,"url":"https://github.com/givebest/gb-paging","last_synced_at":"2026-01-27T00:39:43.303Z","repository":{"id":70333967,"uuid":"67876753","full_name":"givebest/GB-paging","owner":"givebest","description":"兼容IE6+及现代浏览器的简单分页，支持同一页面多个分页。 ","archived":false,"fork":false,"pushed_at":"2016-10-26T01:46:40.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T01:32:18.310Z","etag":null,"topics":["js","pagination","paging"],"latest_commit_sha":null,"homepage":"https://blog.givebest.cn/GB-paging.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/givebest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-10T14:52:47.000Z","updated_at":"2021-01-05T01:55:55.000Z","dependencies_parsed_at":"2023-03-30T22:03:47.025Z","dependency_job_id":null,"html_url":"https://github.com/givebest/GB-paging","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/givebest/GB-paging","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FGB-paging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FGB-paging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FGB-paging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FGB-paging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/givebest","download_url":"https://codeload.github.com/givebest/GB-paging/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/givebest%2FGB-paging/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28794012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["js","pagination","paging"],"created_at":"2024-10-10T16:20:22.705Z","updated_at":"2026-01-27T00:39:43.289Z","avatar_url":"https://github.com/givebest.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GB-paging\n----\n\n## 简介\n\n兼容IE6+及现代浏览器的简单分页，支持同一页面多个分页。\n  \n\n## 使用\n\n### Browser\n\t\n\t\u003clink rel=\"stylesheet\" href=\"css/GB-paging.css\"\u003e\n\t\u003cscript src=\"js/GB-paging.js\"\u003e\u003c/script\u003e\n\n\n### 普通分页\n\n#### HTML\n\t\n\t\u003cdiv id=\"gbpaging\" class=\"gb-paging\"\u003e\n\n#### JS\n\n\tgbPaging({\n\t    total: 101,\n\t    paramName: 'p',\n\t    curPage: getPage('p', '#'),\n\t    size: 5,\n\t    prevText: '\u003c',\n\t    nextText: '\u003e',\n\t    pageInfo: '\u003cb\u003e{{currentPage}}\u003c/b\u003e/\u003cb\u003e{{totalPages}}\u003c/b\u003e',\n\t    eventType: 'click'\n\t});\n\n\n### 同页面另一个分页\n\n#### HTML\n\n\t\u003cdiv id=\"paging1\" class=\"gb-paging\"\u003e\u003c/div\u003e\n\n#### JS\n\n\tgbPaging({\n\t\teleId: 'paging1',\n\t    total: 54,\n\t    size: 10,\n\t    prevText: false,\n\t    nextText: false,\n\t    paramName: 'p1',\n\t    curPage: getPage('p1', '#'),\n\t    pageInfo: false,\n\t    eventType: 'click'\n\t});\n\n\n### 刷新带参数\n\n#### HTML\n\n\t\u003cdiv id=\"paging2\"  class=\"gb-paging\"\u003e\u003c/div\u003e\n\n#### JS\n\n\tgbPaging({\n\t    eleId: 'paging2',\n\t    total: 2500,\n\t    paramName: 'page',\n\t    curPage: getPage('page', '?type=1\u0026name=2\u0026'),\n\t    goUrl: '?type=1\u0026name=2\u0026{{n}}'\n\t});\n\n\n### 辅助函数\n\n\tfunction getPage(pname, other){\n        var page = window.location.search.replace( other + pname + '=', '') || 1;\n        return parseInt(page);\n    }\n\n\n## 选项\n\n- `eleId` 分页容器，仅支持ID，默认为： 'gbpaging'\n- `total`: 总记录数      \n- `paramName`: 分页参数名 || 'p'\n- `curPage`: 当前页码\n- `size`:  每页记录数 || 10\n- `prevText`:  上一页文案 || '上一页'，值为 false 不显示\n- `nextText`: '下一页文案 || '下一页' 值为 false 不显示\n- `pageInfo`: 分页信息，{{currentPage}}当前页码，{{totalPages}}总页数 || 当前第\u003cb\u003e{{currentPage}}\u003c/b\u003e页/共\u003cb\u003e{{totalPages}}\u003c/b\u003e页，值为 false 不显示\n- `eventType`: 事件方式，'click' || 'link'\n- `goUrl`： 链接URL，'?type=1\u0026name=2\u0026{{n}}' || ''，{{n}}为分页参数名+值，如：'p=1'\n\n\n\n\n\n## 感谢他们\n\n演示网页排版来自： [https://github.com/sofish/typo.css](https://github.com/sofish/typo.css)       \n\n\n\n## License\n\n[MIT](./LICENSE) © 2016 [givebest](https://github.com/givebest)\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgivebest%2Fgb-paging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgivebest%2Fgb-paging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgivebest%2Fgb-paging/lists"}