<% Page = Request("Page") PageCount = rs.PageCount IF PageCount>1 Then ShowPage = 10 Temp = (PAGE-1)/ShowPage + 1 BackPage = (Temp-1)*ShowPage NextPage = Temp*ShowPage+1 IF Page > ShowPage Then %> <a href="123.asp?page=<%=BackPage%>">上 <%=ShowPage%> 页</a> <% End IF For I = (Temp-1)*ShowPage To Temp*ShowPage-1 IF Page = I+1 Then %> <%=I+1%> <%Else%> <a href="123.asp?page=<%=I+1%>"><%=I+1%></a> <% End IF IF I+1 >= PageCount Then Exit For Next IF NextPage =< PageCount Then %> <a href="123.asp?page=<%=NextPage%>">下 <%=ShowPage%> 页</a> <% End IF End IF %> |