var
nextPage
=
currentPage+1//下一页
var
countPage
=
1//共多少页
//设置上一页代码
if(countPage>1&¤tPage!=0&¤tPage!=1)
document.write(" target=\"_self\"
href=\"t20150421_4537988.htm\">[首页] target=\"_self\"
href=\"t20150421_4537988"+"_"
+
prevPage
+
"."+"htm\">[上一页] ");
else
if(countPage>1&¤tPage!=0&¤tPage==1)
document.write(" target=\"_self\"
href=\"t20150421_4537988.htm\">[首页] target=\"_self\"
href=\"t20150421_4537988.htm\">[上一页] ");
else
if(countPage>1)
{document.write("[首页] [上一页] ");}
//设置下一页代码
if(countPage>1&¤tPage!=(countPage-1))
document.write(" target=\"_self\"
href=\"t20150421_4537988"+"_"
+
nextPage
+
"."+"htm\">[下一页] target=\"_self\"
href=\"t20150421_4537988_"
+
(countPage-1)
+
".htm\">[尾页] ");
else
if
(countPage>1)
{
document.write("[下一页] [尾页] ");}
if
(countPage>1)
{
document.write(" 共"+countPage+"页 ");
var
dqp=currentPage+1
document.write(" 第 color=red>"+dqp+"/"+countPage+"页 ")
//循环
//var
num
=
5;
//for(var
i=0+(currentPage-1-(currentPage-1)%num)
;
i<=(num+(currentPage-1-(currentPage-1)%num))&&(i
i++){
//
if(currentPage==i)
//
document.write(" color=red>"+(i+1)+" ");
//
else
if(i==0){
//
document.write(" target=\"_self\"
href=\"t20150421_4537988.htm\">"+1+" ");
//
}else
//
document.write(" target=\"_self\"
href=\"t20150421_4537988"+"_"
+
i
+
"."+"htm\">"+(i+1)+" ");
//}
//跳转页面
document.write('转到第 type="text"
id="num"
value='+(currentPage+1)+'
style="width:30px;text-align:center;"
/>页'+' type="submit"
value=" Go "
onClick="javascript:toPage()"
/>');
}
if
(countPage>1){
document.write("
color=\"#CCCCCC\"
style=\"width:550px\"
/>")
}
function
toPage(){
var
_num
=
document.getElementById("num").value;
var
str
=
"t20150421_4537988"+"_"+(_num-1)+"."+"htm";
var
url
=
location.href.substring(0,location.href.lastIndexOf("/")+1);
if(_num<=1||_num==null)
location.href
=
url+"t20150421_4537988"+"."+"htm";
else
if(_num>countPage)
alert("本篇文章最多"+countPage+"页");
else
location.href
=
url+str;
}
声明
来源:互联网
本文地址:http://farm.00-net.com/hq/1/2016-08-10/hq_73270.html