求一数字翻页代码 asp的
展开全部
我给你
<%
'=============================================
'名称:LastNextPage
'作用:分页的调用
'=============================================
Sub LastNextPage1(pagecount1,page1,resultcount1)
Dim query, a, x, temp ,b,c
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page1", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table cellspacing=0 cellpadding=0 border=0>" & vbCrLf )
Response.Write("<TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
' Response.Write(font_style & vbCrLf )
if page1<=1 then
Response.Write ("<img src='images/pageUp.gif'> " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page1=" & (Page1-1) & "><img src='images/pageUp.gif'></A> " & vbCrLf)
end if
b=page1-10
c=page1+10
if b<1 then b=1
if c>pagecount1 then c=pagecount1
For i=b To c
Response.Write(" " & "<a class='footer-text' href=" & action & "?" & temp & "Page1=" & i & vbCrLf)
If i = page1 Then Response.Write(" style=""font-weight:bold; color:#ee7a15;""")
Response.Write(">" & i & "</a>")
Next
if page1>=pagecount1 then
Response.Write (" " & "<img src='images/pageDown.gif'> " & vbCrLf)
else
Response.Write(" " & "<A HREF=" & action & "?" & temp & "Page1=" & (Page1+1) & "><img src='images/pageDown.gif'></A> " & vbCrLf)
end if
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%>
<%
'=============================================
'名称:LastNextPage
'作用:分页的调用
'=============================================
Sub LastNextPage1(pagecount1,page1,resultcount1)
Dim query, a, x, temp ,b,c
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page1", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table cellspacing=0 cellpadding=0 border=0>" & vbCrLf )
Response.Write("<TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
' Response.Write(font_style & vbCrLf )
if page1<=1 then
Response.Write ("<img src='images/pageUp.gif'> " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page1=" & (Page1-1) & "><img src='images/pageUp.gif'></A> " & vbCrLf)
end if
b=page1-10
c=page1+10
if b<1 then b=1
if c>pagecount1 then c=pagecount1
For i=b To c
Response.Write(" " & "<a class='footer-text' href=" & action & "?" & temp & "Page1=" & i & vbCrLf)
If i = page1 Then Response.Write(" style=""font-weight:bold; color:#ee7a15;""")
Response.Write(">" & i & "</a>")
Next
if page1>=pagecount1 then
Response.Write (" " & "<img src='images/pageDown.gif'> " & vbCrLf)
else
Response.Write(" " & "<A HREF=" & action & "?" & temp & "Page1=" & (Page1+1) & "><img src='images/pageDown.gif'></A> " & vbCrLf)
end if
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询