新微赢技术网
标题:
谁能告诉我这个分页效果的代码是怎么调用的呀?高手帮帮忙咯
[打印本页]
作者:
太阳神
时间:
2010-1-7 02:22
标题:
谁能告诉我这个分页效果的代码是怎么调用的呀?高手帮帮忙咯
<%
function showpage(pagecount,pagesize,page,resultcount)
Dim query, a, x, temp
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("] [共" & resultcount & "条 <font color=red>"& pagesize & "</font>条/页]")
Response.Write(" 转到" & "<input name=page size=4 value=" & page & ">" & "页<input type=submit value=go>")
End function
%>
这个是我找来的,但是不会用,呵呵,会的说哦,谢哈!
作者:
三颗残牙
时间:
2010-1-7 02:22
恩,我试试,谢哦
作者:
...火狐狸```
时间:
2010-1-7 02:22
调用<%call showpage(pagecount,pagesize,page,resultcount)%>
pagecount,pagesize,page,resultcount这四个变量你可以在分页的时候赋予他们值。
欢迎光临 新微赢技术网 (http://bbs.weiying.cn/)
Powered by Discuz! X3.2