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.