| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 363 人关注过本帖
标题:谁能告诉我这个分页效果的代码是怎么调用的呀?高手帮帮忙咯
只看楼主 加入收藏
xing_22
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2007-3-12
收藏
 问题点数:0 回复次数:2 
谁能告诉我这个分页效果的代码是怎么调用的呀?高手帮帮忙咯

<%
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
%>
这个是我找来的,但是不会用,呵呵,会的说哦,谢哈!

搜索更多相关主题的帖子: 效果 代码 
2007-04-07 21:47
caor1987
Rank: 1
等 级:新手上路
帖 子:228
专家分:0
注 册:2006-10-15
收藏
得分:0 

调用<%call showpage(pagecount,pagesize,page,resultcount)%>
pagecount,pagesize,page,resultcount这四个变量你可以在分页的时候赋予他们值。

2007-04-09 10:45
xing_22
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2007-3-12
收藏
得分:0 
恩,我试试,谢哦
2007-04-10 09:50
快速回复:谁能告诉我这个分页效果的代码是怎么调用的呀?高手帮帮忙咯
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012743 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved