PageSourceSearch

https://zhhchj.com/templets/default/js/pageFoot.js

js zhhchj.com collected 2026-10-06 13:16:59 UTC 2,253 bytes, 75 lines download raw bytes

1var pagefoot = {};
2//当前页码
3pagefoot.p = 1;
4//一页显示数量
5pagefoot.pagesize = 30;
6//总数量
7pagefoot.count = 0;
8//总行数
9pagefoot.pagecount = 0;
10//下一页的页码,为箱包中心使用
11pagefoot.nextp = 0;
12
13pagefoot.refpage = function () {
14    pagefoot.p = parseInt(pagefoot.p);
15    pagefoot.count = parseInt(pagefoot.count);
16    var pagehtml = '<div class="pagination">';
17    var pagecount = parseInt((pagefoot.count + pagefoot.pagesize - 1) / pagefoot.pagesize);
18    pagefoot.pagecount = pagecount;
19    if (pagefoot.p == 1) {
20        pagehtml += '<span class="current prev">上一页</span>';
21    } else {
22        pagehtml += '<a href="javascript:void(0);" data-p="' + (pagefoot.p - 1) + '" class="prev">上一页</a>';
23    }
24    //第一页显示逻辑
25    if (pagefoot.p == 1) {
26        pagehtml += '<span class="current">'+pagefoot.p+'</span>';
27    } else {
28        pagehtml += '<a href="javascript:void(0);" data-p="1" >1</a>';
29    }
30
31    //计算中间显示页数保留中间8位的页码,其他用....显示
32    var begi = 2;
33    var endi = (pagefoot.p + 4 > pagecount) ? pagecount: pagefoot.p +4;
34    if (pagefoot.p - 5 > 0)
35    {
36        begi = pagefoot.p - 4;
37        pagehtml += '...';
38    }
39
40
41    for (; begi <= endi; begi++)
42    {
43        if (begi == pagefoot.p)
44        {
45            pagehtml+='<span class="current">'+begi+'</span>';
46        }
47        else
48        { 
49            pagehtml+='<a href="javascript:void(0);" data-p='+begi+'>'+begi+'</a>';
50        }
51    }
52    if (endi < pagecount)
53    {
54        pagehtml+='...';
55    }
56
57    //显示下一页
58    if (pagecount == pagefoot.p || (pagefoot.p == 1 && pagefoot.count == 0))
59    {
60        pagehtml += ' <span class="current next">下一页</span>';
61        pagefoot.nextp = 0;
62    }
63    else
64    {
65        pagefoot.nextp = (pagefoot.p + 1);
66        pagehtml += ' <a href="javascript:void(0);" data-p=' + (pagefoot.p + 1) + ' class="next">下一页</a>';
67    }
68
69    pagehtml += '</div>';
70
71    $('#js-pager').html(pagehtml);
72    $('#js-pager .pagination a').click(function () {
73        pagefoot.callback && pagefoot.callback($(this).attr('data-p'), pagefoot.pagesize);
74    });
75};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.