sql="select * from [Users] where uid like '%"&UID&"%'" end if
rs.open sql,conn,1,2
dim MaxPerPage MaxPerPage=16 '假如没有数据时 'If rs.eof and rs.bof then 'call showpages 'response.write "
还没任何用户订单
" 'response.end 'End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示 dim text,checkpage text="0123456789" Rs.PageSize=MaxPerPage for i=1 to len(request("page")) checkpage=instr(1,text,mid(request("page"),i,1)) if checkpage=0 then exit for end if next
If checkpage<>0 then If NOT IsEmpty(request("page")) Then CurrentPage=Cint(request("page")) If CurrentPage < 1 Then CurrentPage = 1 If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount Else CurrentPage= 1 End If If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if Else CurrentPage=1 End if
'call showpages call list
If Rs.recordcount > MaxPerPage then end if
'显示帖子的子程序 Sub list()%> <% if not rs.eof then i=0 do while not rs.eof %> <%=rs("显示的东东")%> <% i=i+1 if i >= MaxPerpage then exit do rs.movenext loop end if %> '下面是分页 <% Response.write "-> 全部-" Response.write "共" & "" & Cstr(Rs.RecordCount) & "" & "条信息 " Response.write "第" & "" & Cstr(CurrentPage) & "" & "/" & Cstr(rs.pagecount) & " " If currentpage > 1 Then response.write "首页" Response.write "上一页" Else Response.write "上一页 " End if If currentpage < Rs.PageCount Then Response.write "下一页 " Response.write "尾页 " Else Response.write "" Response.write "下一页 " End if 'response.write "
" 'response.write "转到: " 'response.write " " %> <% End sub rs.close conn.close 'end if %> 自己稍改一下.我不知道你主要是用来分什么页面的..
回答2:
<% dim hh dim ee Dim ipagecount Dim ipagecurrent Dim strorderBy Dim irecordsshown if request.querystring("page")="" then ipagecurrent=1 else ipagecurrent=cint(request.querystring("page")) end if rs.pagesize =4 rs.cachesize =4 ipagecount = rs.pagecount Response.Write"
" top=1 if rs.bof and rs.eof then response.write "
没有任何文件
" else cc=rs("btype") cb=rs("fanwei") rs.absolutepage = ipagecurrent irecordsshown = 0 do while not rs.eof and irecordsshown<4 if not rs.eof then ee=rs("minipic") hh=mid(ee,instr(ee,"/")+1) %>
分页 <% top=top+1 irecordsshown=irecordsshown+1 rs.movenext end if if top>4 then exit do loop end if rs.Close set rs=nothing Response.Write"
共有 "&ipagecount&" 页 当前为第 "&ipagecurrent&" 页 " if ipagecurrent=1 then Response.Write"首页 | " else Response.Write"首页 | " end if if ipagecurrent=1 then Response.Write"上一页 | " else Response.Write"上一页 | " end if if ipagecount>ipagecurrent then Response.Write"下一页 " else Response.Write"下一页" end if if ipagecount>ipagecurrent then Response.Write"| 末页 " else Response.Write"| 末页 " end if Response.Write"
" %>
为什么能看到页 也能看到数据 也能看到几页 就是不能点下一页啊 显示22页 问题补充:在线等 提问者:slswan392 - 试用期 一级 回答 共 2 条 sql="select * from [Users] where uid like '%"&UID&"%'" end if
rs.open sql,conn,1,2
dim MaxPerPage MaxPerPage=16 '假如没有数据时 'If rs.eof and rs.bof then 'call showpages 'response.write "
还没任何用户订单
" 'response.end 'End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示 dim text,checkpage text="0123456789" Rs.PageSize=MaxPerPage for i=1 to len(request("page")) checkpage=instr(1,text,mid(request("page"),i,1)) if checkpage=0 then exit for end if next
If checkpage<>0 then If NOT IsEmpty(request("page")) Then CurrentPage=Cint(request("page")) If CurrentPage < 1 Then CurrentPage = 1 If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount Else CurrentPage= 1 End If If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if Else CurrentPage=1 End if
'call showpages call list
If Rs.recordcount > MaxPerPage then end if
'显示帖子的子程序 Sub list()%> <% if not rs.eof then i=0 do while not rs.eof %> <%=rs("显示的东东")%> <% i=i+1 if i >= MaxPerpage then exit do rs.movenext loop end if %> '下面是分页 <% Response.write "-> 全部-" Response.write "共" & "" & Cstr(Rs.RecordCount) & "" & "条信息 " Response.write "第" & "" & Cstr(CurrentPage) & "" & "/" & Cstr(rs.pagecount) & " " If currentpage > 1 Then response.write "首页" Response.write "上一页" Else Response.write "上一页 " End if If currentpage < Rs.PageCount Then Response.write "下一页 " Response.write "尾页 " Else Response.write "" Response.write "下一页 " End if 'response.write "
" 'response.write "转到: " 'response.write " " %> <% End sub rs.close conn.close 'end if %> 自己稍改一下.我不知道你主要是用来分什么页面的.. 回答者:swalia - 试用期 一级 2-21 07:54 <% '执行sql set rs=server.CreateObject("adodb.recordset")%> rs.open "select * from news order by id desc ",a,1,3
'分页 i=50 rs.pagesize=i pu=request("pu") if pu="" then pu=1 if cint(pu)<="0" then pu=1 if cint(pu)>rs.pagecount then pu=rs.pagecount if not rs.eof then rs.absolutepage=cint(pu) '显示记录 if not rs.eof then do while not rs.eof and i=>1 response.write rs("字段")'显示字段 '就这里改你要的,其它复制用就可以 rs.movenext i=i-1 loop end if %>
<% '执行sql set rs=server.CreateObject("adodb.recordset")%> rs.open "select * from news order by id desc ",a,1,3
'分页 i=50 rs.pagesize=i pu=request("pu") if pu="" then pu=1 if cint(pu)<="0" then pu=1 if cint(pu)>rs.pagecount then pu=rs.pagecount if not rs.eof then rs.absolutepage=cint(pu) '显示记录 if not rs.eof then do while not rs.eof and i=>1 response.write rs("字段")'显示字段 '就这里改你要的,其它复制用就可以 rs.movenext i=i-1 loop end if %>