|
<%
function pagination(pagecount,pagesize,page,resultcount)
Dim query, a, x, temp
pagesize=10
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), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+this.page.value;return false;"">")
if page<=1 then
Response.Write ("[第一页] [上一页] ")
else
Response.Write("[<a href=" & action & "?" & temp & "Page=1>第一页</a>] ")
Response.Write("[<a href=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</a>] ")
end if
if page>=pagecount then
Response.Write ("[下一页] [尾页]")
else
Response.Write("[<a href=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</a>] ")
Response.Write("[<a href=" & action & "?" & temp & "Page=" & pagecount & ">尾页</a>]")
end if
Response.Write("[页次:<font color=red>" & page & "</font>/" &pageCount)
Response.Write("] [共<font color=red>" & resultcount & "</font>条记录]<font color=red>"& pagesize & "</font>条/页]")
Response.Write(" 转到" & "<input name=page size=4 value=" & page & ">" & "页<input type=submit value=go>")
End function
%>
显示为:
[第一页] [上一页] [下一页] [尾页][页次:/2] [共15条记录]10条/页] 转到页
[页次:<<这里有问题>>>/2],而且并没有10条/页分开,还是全部显示了,,,, |
|