分页时点下一页提示 对象被关闭,不允许操作 5
<!--#includefile="conn.asp"--><%ifmaxperpages=""thenmaxperpage=maxelsemaxperpage=maxp...
<!--#include file="conn.asp"-->
<%
if maxperpages="" then
maxperpage=max
else
maxperpage=maxperpages
end if
dim totalPut,CurrentPage,TotalPages,rs_form
if not (rs_form.bof or rs_form.eof) then
rs_form.MoveFirst
rs_form.pagesize=maxperpage
howmanyfields=rs_form.Fields.Count-1
If trim(Request("Page"))<>"" then
CurrentPage= CLng(request("Page"))
If CurrentPage> rs_form.PageCount then
CurrentPage = rs_form.PageCount
End If
Else
CurrentPage= 1
End If
totalPut=rs_form.recordcount
if CurrentPage<>1 then
if (currentPage-1)*maxperpage<totalPut then
rs_form.move(currentPage-1)*maxperpage
bookmark=rs_form.bookmark
end if
end if
if (totalPut mod maxperpage)=0 then
n= totalPut \ maxperpage
else
n= totalPut \ maxperpage + 1
end if
response.write""¤tpage&"/"&n&",总数"&rs_form.recordcount&",现在显示"
if currentpage="1" then
response.write"1"
else
response.write""&(currentpage-1)*maxperpage+1&""
end if
response.write"-"¤tpage*maxperpage&"条 "
k=currentPage
if k<>1 then
response.write "<a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page=1'>首页</a> "
response.write "<a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page="+cstr(k-1)+"'>上一页</a> "
else
Response.Write "<font color='#666666'>首页 上一页</font>"
end if
if k<>n then
response.write " <a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page="+cstr(k+1)+"'>下一页</a> "
response.write "<a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page="+cstr(n)+"'>末页</a> "
else
Response.Write " <font color='#666666'>下一页 末页</font>"
end if
end if
%> 展开
<%
if maxperpages="" then
maxperpage=max
else
maxperpage=maxperpages
end if
dim totalPut,CurrentPage,TotalPages,rs_form
if not (rs_form.bof or rs_form.eof) then
rs_form.MoveFirst
rs_form.pagesize=maxperpage
howmanyfields=rs_form.Fields.Count-1
If trim(Request("Page"))<>"" then
CurrentPage= CLng(request("Page"))
If CurrentPage> rs_form.PageCount then
CurrentPage = rs_form.PageCount
End If
Else
CurrentPage= 1
End If
totalPut=rs_form.recordcount
if CurrentPage<>1 then
if (currentPage-1)*maxperpage<totalPut then
rs_form.move(currentPage-1)*maxperpage
bookmark=rs_form.bookmark
end if
end if
if (totalPut mod maxperpage)=0 then
n= totalPut \ maxperpage
else
n= totalPut \ maxperpage + 1
end if
response.write""¤tpage&"/"&n&",总数"&rs_form.recordcount&",现在显示"
if currentpage="1" then
response.write"1"
else
response.write""&(currentpage-1)*maxperpage+1&""
end if
response.write"-"¤tpage*maxperpage&"条 "
k=currentPage
if k<>1 then
response.write "<a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page=1'>首页</a> "
response.write "<a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page="+cstr(k-1)+"'>上一页</a> "
else
Response.Write "<font color='#666666'>首页 上一页</font>"
end if
if k<>n then
response.write " <a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page="+cstr(k+1)+"'>下一页</a> "
response.write "<a href='"&mid(request.servervariables("path_info"),instrrev(request.servervariables("path_info"),"/")+1,len(request.servervariables("path_info"))-instrrev(request.servervariables("path_info"),"/"))&"?"&querystring&"page="+cstr(n)+"'>末页</a> "
else
Response.Write " <font color='#666666'>下一页 末页</font>"
end if
end if
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询