【谁能帮帮我啊,asp分页问题】
asp吧
全部回复
仅看楼主
level 1
alven916 楼主
'***********************************************
'过程名:showpage
'作 用:显示“上一页 下一页”等信息
'参 数:sfilename ----链接地址
' totalnumber ----总数量
' maxperpage ----每页数量
' ShowTotal ----是否显示总数量
' ShowAllPages ---是否用下拉列表显示所有页面以供跳转。有某些页面不能使用,否则会出现JS错误。
' strUnit ----计数单位
'***********************************************
sub showpage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit)
dim n, i,strTemp,strUrl
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
strTemp= "<table align='center'><form name='showpages' method='Post' action='" & sfilename & "'><tr><td>"
if ShowTotal=true then
strTemp=strTemp & "共 <b>" & totalnumber & "</b> " & strUnit & "  "
end if
strUrl=JoinChar(sfilename)
if CurrentPage<2 then
strTemp=strTemp & "首页 上一页 "
else
strTemp=strTemp & "<a href='" & strUrl & "page=1'>首页</a> "
strTemp=strTemp & "<a href='" & strUrl & "page=" & (CurrentPage-1) & "'>上一页</a> "
end if
if n-currentpage<1 then
strTemp=strTemp & "下一页 尾页"
else
strTemp=strTemp & "<a href='" & strUrl & "page=" & (CurrentPage+1) & "'>下一页</a> "
strTemp=strTemp & "<a href='" & strUrl & "page=" & n & "'>尾页</a>"
end if
strTemp=strTemp & " 页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
strTemp=strTemp & " <b>" & maxperpage & "</b>" & strUnit & "/页"
if ShowAllPages=True then
strTemp=strTemp & " 转到:<select name='page' size='1' onchange='javascript:submit()'>"
for i = 1 to n
strTemp=strTemp & "<option value='" & i & "'"
if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected "
strTemp=strTemp & ">第" & i & "页</option>"
next
strTemp=strTemp & "</select>"
end if
strTemp=strTemp & "</td></tr></form></table>"
response.write strTemp
end sub
就这个,现在的页面是链接为:Product.asp?BigClassName=
但是我新建了一个文件是case.asp
找了半天不知道在哪改,麻烦各位大侠帮帮忙吧
2014年03月22日 05点03分 1
level 11
page 就这个
2014年03月22日 07点03分 2
level 12
用十五字混经验的有谁比我厉害呢
--我是一只小尾巴~咿呀咿呀哟....哎呀不要咬我不能吃的!
2014年03月26日 18点03分 3
level 12
如今发帖有困难整不好就被删贴了
--我是一只小尾巴~咿呀咿呀哟....哎呀不要咬我不能吃的!
2014年03月27日 17点03分 4
level 12
你们有见过这么整齐的十五个字吗
--我是一只小尾巴~咿呀咿呀哟....哎呀不要咬我不能吃的!
2014年03月28日 15点03分 5
level 12
用十五字混经验的有谁比我厉害呢
--我是一只小尾巴~咿呀咿呀哟....哎呀不要咬我不能吃的!
2014年03月29日 07点03分 6
level 12
因为为了一句话万一这贴子火了呢
--我是一只小尾巴~咿呀咿呀哟....哎呀不要咬我不能吃的!
2014年03月29日 22点03分 7
1