asp.net学习_分页的设计(5)
来源:未知 责任编辑:责任编辑 发表时间:2014-04-20 03:40 点击:次
32: var prevPageIndex = PageIndex - 1;
33: if (PageIndex == startPageIndex) {
34: $content.append($("<span>首页</span>"));
35: $content.append($("<span>上一页</span>"));
36: } else {
37:
38: $content.append(renderButton(RecordCount, 1, pagerClick, "首页"));
39: $content.append(renderButton(RecordCount, prevPageIndex, pagerClick, "上一页"));
40: }
41: //这里判断是否显示页码
42: if (pagerDefaults.ShowPageNumber) {
43: // var html = "";
44: //页码部分隐藏 只显示中间区域
45: if (endPageIndex <= 5 && PageIndex <= 5) {
46: for (var i = 1; i <= endPageIndex; i++) {
47: if (i == PageIndex) {
48: $content.append($("<span>" + i + "</span>"));
49: } else {
50: $content.append(renderButton(RecordCount, i, pagerClick, i));
51: }
52:
53: }
54:
55: } else if (endPageIndex > 5 && endPageIndex - PageIndex <= 2) {
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>