这个问题如何解决?

cc9638895 2003-08-20 03:20:51
如何将我的一个表 分页显示出来!请高手门给出代码!谢谢:
下面是把记录显示在个表格中!
<P align=center>
<TABLE class=Report <%=stReportTable%> align=center width="75%">

<TR>
<TD align=middle vAlign=top nowrap class=ReportHead>选择</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>类别</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>编号</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>书名</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>作者</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>出版社</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>价格</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>ISBN</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>是否推荐</TD>
</TR>
<TR>
<TD align=middle vAlign=top><INPUT type="checkbox" id=checkbox1 name=checkbox1 value=<%=rs("book_id")%>></TD>
<TD align=middle vAlign=top><%=rs("class_id")%></TD>
<TD align=middle vAlign=top><%=trim(rs("book_id"))%></TD>
<TD align=middle vAlign=top><%=trim(rs("book_name"))%></TD>
<TD align=middle vAlign=top><%if trim(rs("book_writer"))<>"" then response.write trim(rs("book_writer")) else response.write " " %></TD>
<TD align=middle vAlign=top><%if trim(rs("book_publish"))<>"" then response.write trim(rs("book_publish")) else response.write " " %></TD>
<TD align=middle vAlign=top><%if trim(rs("book_price"))<>"" then response.write trim(rs("book_price")) else response.write " " %></TD>
<TD align=middle vAlign=top><%=trim(rs("book_isbn"))%></TD>
<TD align=middle vAlign=top>
<%
select case trim(rs("special"))

case "true"
Response.Write "是"
case "false"
Response.Write "否"
case else
Response.Write "未知"
end select
%>
</TD>
</TR>
</table>
...全文
46 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ygghost 2003-10-28
  • 打赏
  • 举报
回复
<TABLE class=Report <%=stReportTable%> align=center width="75%">
<TR>
<TD align=middle vAlign=top nowrap class=ReportHead>选择</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>类别</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>编号</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>书名</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>作者</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>出版社</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>价格</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>ISBN</TD>
<TD align=middle vAlign=top nowrap class=ReportHead>是否推荐</TD>
</TR>
<%
set rs=server.CreateObject("ADODB.RecordSet")
strsql="select a.*,b.class_name from bookcity_book as a inner join bookcity_class as b on a.class_id=b.class_id"
strsql=strsql&" order by a.class_id,a.addtime desc"
rs.open strsql,application("cn"),3,1
rs.PageSize=10
dim curpage
curpage=Request.QueryString("curpage")
if isnull(curpage) or isempty(curpage) or curpage="" then
curpage=1
end if
rs.AbsolutePage=curpage
dim rowcount
rowcount=0
if rs.RecordCount>0 then
do while not rs.EOF and rowcount<rs.pagesize
%>
<TR style="cursor:hand;" bgcolor="#FFFFFF" title="双击可预览图书详细信息" ondblclick="show('http://10.163.184.248/eastn_test/bookcity/asp/KindDisplay/showall.asp?all=<%=rs("book_id")%>&class=<%=rs("class_id")%>');">
<TD align=middle vAlign=top><INPUT type="checkbox" id=checkbox1 name=checkbox1 value=<%=rs("book_id")%>></TD>
<TD align=middle vAlign=top nowrap><%=rs("class_name")%></TD>
<TD align=middle vAlign=top><%=trim(rs("book_id"))%></TD>
<TD align=middle vAlign=top width=150><%=trim(rs("book_name"))%></TD>
<TD align=left vAlign=top><%if trim(rs("book_writer"))<>"" then response.write trim(rs("book_writer")) else response.write " " %></TD>
<TD align=left vAlign=top><%if trim(rs("book_publish"))<>"" then response.write trim(rs("book_publish")) else response.write " " %></TD>
<% if rs("book_price")<>"" then%>
<TD align=right vAlign=top><%=rs("book_price")%><%=rs("price_unit")%></TD>
<% else %>
<TD align=right vAlign=top> </TD>
<% end if%>
<TD align=left vAlign=top nowrap><%=trim(rs("book_isbn"))%></TD>
<TD align=middle vAlign=top>
<%
select case trim(rs("special"))

case "1"
Response.Write "是"
case "0"
Response.Write "否"
case else
Response.Write "未知"
end select
%>
</TD>
</TR>
<%
rowcount=rowcount+1
rs.MoveNext
loop
end if
%>
<TR>
<TD align=middle vAlign=top nowrap class=ReportHead colspan=16>
总共[ <%=rs.RecordCount%> ]条记录
每页至多[ <%=rs.PageSize%> ]条记录
总共[ <%=rs.PageCount%> ]页
目前位第[ <%=curpage%> ]页

<%if cint(curpage)=1 then%>
<A href="bookcity_admin.asp?curpage=
<%curpage=cint(curpage)+1
Response.Write curpage
%>">下一页</A>
<% elseif cint(curpage)=rs.PageCount then%>
<A href="bookcity_admin.asp?curpage=
<%curpage=cint(curpage)-1
Response.Write curpage
%>">上一页</A>
<% else%>
<A href="bookcity_admin.asp?curpage=
<%curpage=Request.QueryString("curpage")
curpage=cint(curpage)-1
Response.Write curpage
%>">上一页</A>
<A href="bookcity_admin.asp?curpage=
<%curpage=Request.QueryString("curpage")
if cint(curpage)<rs.PageCount then curpage=cint(curpage)+1
Response.Write curpage
%>">下一页</A>
<%end if%>
转到
<INPUT type="text" id=zdt name=zdt style="HEIGHT: 22px; WIDTH: 50px">

<INPUT type="button" value="Go!" id=zdb name=zdb LANGUAGE=javascript class="smallflatbutton" onclick="return zdb_onclick()">
</TD>
</TR>
</TABLE>
hfkj 2003-08-20
  • 打赏
  • 举报
回复
</center>
</TD></TR>
<TR bgColor=#e1f0ff>
<TD class=main2 width="742" height="27" bgcolor="#DEEBD6">
<p align="center"> 
</TD></TR>
<TR bgColor=#e1f0ff>
<TD class=main2 width="742" height="4" bgcolor="#398A00" background="images/bg.gif"></TD></TR></TBODY></TABLE><br>
<%
End sub
rs.close
conn.close
%>
</div>
<div align="center">
<center> </form> 
<%
'显示翻页的子程序
sub showpages()%>
<table bgColor="#f8e8a0" border="0" cellPadding="0" cellSpacing="0" width="100%" >
<tr><td >
<%
response.write "<form method=Post action='user2info.asp'>"
%>

<table bgColor="#1f60a0" border="0" cellPadding="0" cellSpacing="0" width="100%" height="30">
<tr>
<td bgcolor="#DEEBD6" class=main2>
<font color="#000000">
<p align="left">
<%
Response.write "<font color='#000000'>分页-</font>"
If currentpage > 1 Then
response.write "<a href='user2info.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='user2info.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>前页</font></a><font color='#ffffff'><b>-</b></font>"
Else
Response.write "<font color='#000000'>首页-</font>"
Response.write "<font color='#000000'>前页-</font>"
End if

If currentpage < Rs.PageCount Then
Response.write "<a href='user2info.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>后页</font></a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='user2info.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a>  "
Else
Response.write "<font color='#000000'>后页-</font>"
Response.write "<font color='#000000'>尾页</font>  "
End if
Response.write "<font color='#000000'>页次:</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font> "
Response.write "<font color=#ff0000>" & Cstr(MaxPerPage) & "</font>" & "<font color='#000000'>条记录/页 " & "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条记录</font>  "

response.write "</td><td align='right'>"
response.write "<font color='#ffffff' class=main2>转到:</font><input type='text' name='page' size=4 maxlength=4 class=smallInput value="¤tpage&"> "
response.write "<input class=buttonface type='submit' value='Go' name='cndok' style='background-color: #e1f0ff'></span>  "
%>
</font>
</td>
</tr>
</table>
</center>
hfkj 2003-08-20
  • 打赏
  • 举报
回复
<TABLE cellSpacing=1 cellPadding=4 width=756 bgColor=#416327 height="136">
<TBODY>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main2 height="10" bgcolor="#398A00" background="images/bg.gif" width="742"></TD></TR>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main2 height="18" width="734" bgcolor="#DEEBD6">VIP会员列表-- 
<input type="button" value="管理首页" onclick=" window.location='manage.asp'" style="font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#D4D0C8'"> 

</TD>
</center>
</TR>
<center>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main2 height="15" width="742" bgcolor="#DEEBD6">
<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#416327" bordercolordark="#DEEBD6" height="13">
<td width="11%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">会员账号</font></td>
<td width="11%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">主营类别</font></td>
<td width="29%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">公司名称</font></td>
<td width="11%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">联系人</font></td>
<td width="9%" bgcolor="#398A00" align="center" height="19" class=main2><font color="#FFFFFF">省份</font></td>
<td width="9%" bgcolor="#398A00" align="center" height="19" class=main2><font color="#FFFFFF">注册日期</font></td>
<td width="14%" bgcolor="#398A00" align="center" height="19" class=main2><font color="#FFFFFF">操作</font></td>
<%
if not rs.eof then
i=0
do while not rs.eof
%>
</center>
<tr class=main2>
<center>
<td width="11%" align="left" height="1">
<p align="center"><%=rs("txtId")%></td>
</center>
<td width="11%" align="left" height="1"><%=rs("txtCat")%></td>
<td width="29%" align="left" height="1"><%=rs("txtCompany")%></td>
<td width="11%" align="left" height="1"><%=rs("txtContect")%></td>
<td width="9%" align="left" height="1">
<p align="left"><%=rs("txtProv")%></td>
<td width="9%" align="left" height="1">
<p align="center"><%=rs("dateandtime")%></p>
</td>
<center>
<td width="14%" align="center" height="1">
<input type="button" value="详情" onclick=" window.location='userdetail.asp?id=<%=rs("id")%>'" style="font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#D4D0C8'">
<input type="button" value="删除" onclick="if (confirm('确实要此条记录吗?')) window.location='userinfodel.asp?id=<%=rs("id")%>'" style="font-family: 新细明体, 宋体, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMouseOver="this.style.backgroundColor='#FFC864'" onMouseOut="this.style.backgroundColor='#D4D0C8'"></td>

</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%>

</table>
lions911 2003-08-20
  • 打赏
  • 举报
回复
<!--#include file=conn.asp -->
<!--#include file=session.asp-->
<LINK href="style.css" type=text/css rel=stylesheet>
<%
diaryperpage=15 '设置每页显示的页数
dim totaldiary,Currentpage,totalpages,i
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from news,bigclass where bigclass.bigclassid=news.bigclassid order by ID desc"
rs.Open rs.Source,conn,1,1
%>
<table width="80%%" border="0" cellspacing="1" align=center>
<tr>
<td width="592" height="14"><b><font size="4">[修改记录]</font></b></td>
</tr>
</table>
<TABLE>
<TR>
<TD></TD>
</TR>
</TABLE>

<%if not rs.eof then
rs.Movefirst
rs.pagesize=diaryperpage '每页显示多少条记录
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totaldiary=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*diaryperpage<totaldiary then
rs.move(currentpage-1)*diaryperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totaldiary mod diaryperpage)=0 then
totalpages=totaldiary\diaryperpage
else
totalpages=totaldiary\diaryperpage+1
end if
position=RS.PageSize*currentpage
pagebegin=position-RS.PageSize+1
pagebegin=30-30+1=1
if position < RS.RecordCount then
pagend=position
else
pagend= RS.RecordCount
end if
i=0
color=1
%>

<table width="80%" border="0" cellspacing="1" align="center" cellpadding="2" bgcolor="#E7E3E7">
<%
do while not rs.eof and i<diaryperpage
%>
<tr>
<td class="chinese" bgcolor="#FFFFFF" align="right">
<%
if color mod 2 <>0 then
%>
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor=#E6E6E6>
<%else%>
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
<%end if%>
<form method='POST' action='ModifyNews2.asp?id=<%=rs("id")%>&bigclassid=<%=rs("bigclassid")%>'>
<input type=hidden name=ID value=<%= rs("ID")%>>
<tr><td width=74% ><FONT COLOR="#000000"> </FONT><FONT COLOR='#CC0000'>[<%=rs("bigclassname")%>]</FONT>  <font color=225588><A HREF="../readnews.asp?id=<%=rs("id")%>" target=_blank><%=rs("title")%></A> </font></a></td>
<td width="23%" align=right ><input type=submit value="修改" style="border-style: double; border-color: #efefef"></td>
</form>
</tr>
</table>
</td>
</tr>
<%
i=i+1
color=color+1
rs.movenext
loop
else
If rs.EOF And rs.BOF Then%>
<tr>
<td height="30" class="chinese" align="center" bgcolor="#E7E3E7">目前还没有记录!</td>
</tr>
<%end if
end if%>
</table>
</td></tr></table>

<table width="80%" border="0" cellspacing="0" align="center" cellpadding="0" bgcolor="white">
<form name="form1" method="post" action="modifynews1.asp">
<tr>
<td><BR></td>
</tr>
<tr>
<td align="right" class="diaryhead">显示[<%=pagebegin%>-<%=pagend%>]条   <%=currentpage%>/<%=totalpages%>页,<%=totaldiary%>条记录/<%=diaryperpage%>篇每页.
<%
i=1
'dy10=false
showye=totalpages
'if showye>10 then
'dy10=true
'showye=10
'end if
for i=1 to showye
if i=currentpage then
%>
<%=i%>
<%else%>
<a href="modifynews1.asp?page=<%=i%>">[<%=i%>]</a>
<%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
<a href="modifynews1.asp?page=<%=page%>" title="下一页">>>></a>
<%end if%>

<%'if not dy10 then%>
<input type="text" name="page" class="textarea" size="1" value="<%=currentpage%>">
<input type="submit" name="Submit" value="Go" class="button">
<%'end if%>
</td>
</tr>
</form>
</table>
<TABLE align="center" border=0 width="80%">
<TR>
<TD align="right">
<form name="form2" method="post" action="modifynews1.asp">
显示[<%=pagebegin%>-<%=pagend%>]条   <%=currentpage%>/<%=totalpages%>页,<%=totaldiary%>条记录/<%=diaryperpage%>篇每页.
<%
k=currentPage
n=rs.pagecount
if k<>1 then
response.write "[<b>"+"<a href='modifynews1.asp?page=1'>首页</a></b>] "
response.write "[<b>"+"<a href='modifynews1.asp?page="+cstr(k-1)+"'>上一页</a></b>] "
else
Response.Write "[首页][上一页]"
end if
if k<>n then
response.write "[<b>"+"<a href='modifynews1.asp?page="+cstr(k+1)+"'>下一页</a></b>] "
response.write "[<b>"+"<a href='modifynews1.asp?page="+cstr(n)+"'>尾页</a></b>] "
else
Response.Write "[下一页][尾页] "
end if
Response.Write"<input type='text' name='page' class='textarea' size='1' value="¤tpage&">"
Response.Write"<input type='submit' name='Submit' value='Go' class='button'>"
%>
</form></TD>
</TR>
</TABLE>
<%
rs.close
set rs=nothing
%>
随机开仓,止盈1~2个点,止损1~20个点能实现盈利正期望吗?《从编程小白到量化宗师之路》系列课程是一套综合性实战课程,涵盖股票,期货,虚拟货币等的交易方法和策略手段。《m单位止盈 n单位止损的方式,能不能实现盈利?》是本系列的第四个中级课程。本网站的课程宗旨是缩短个人或小型投资者与大型机构投资者之间的的差距。课程内容从交易者经常见到,经常思考的问题开始,通过分析成交后的盈亏分布,建立模型,刻画问题,并对问题以数学的方式进行了表达。从而得出结论。与市面上的其他理论课程不同,本课程注重实战,注重结果,全部模型代码均已经上传发表,学员上课后,可以使用自己的tick数据,进行分析。如果获取tick数据有疑问,可以参考课程:《期货CTP高频数据Tick下载》 https://edu.csdn.net/course/detail/24783本课程能够解答的问题有:1)请问1单位止盈,3单位止损的系统是否能实现正期望值? https://www.zhihu.com/question/423194389/answer/14989174122)抢帽子交易是什么意思?为什么有的人能够成功,说是取款机,而有的人说风险巨大,是老虎机。看过这个课程,您将会知道:a) 这类问题的究极解决方案,直达问题核心,不再纠结原因b)构建一段时间可用的交易策略c)知道“没有不变的策略”的原因  
【课程简介】本课程是《Armv8/Armv9架构从入门到精通 第二期》中的第四章。建议购买大课程。本课程以为armv8-aarch64、armv9为基准,不涉及armv7及其以前的版本,也不涉及aarch32。本课程包含但不限于以下内容MMU的基础学习:啥是MMU?工作原理?MMU和cache之间的关系?及其怎样相互影响的?哪些是MMU硬件自动的行为?哪些是软件可配置的行为?地址空间基础:啥是虚拟地址空间?啥是物理地址空间?啥时memory-map? 代码程序中的虚拟地址空间是怎样的?arm core硬件决定的物理地址空间是怎样的?SOC memory-map时的地址空间是怎样的?具体的外设又是怎样的地址空间?Translation Regime:系统里有多少个MMU?系统里有多少个Translation Regime?他们之间的关系是怎样的?页表翻译:MMU是怎样翻译的?页表有几级?这些信息是怎么告诉MMU的,MMU又是怎样工作的,软件又需要怎样设计?stage1和stage2的区别和使用?Descriptor:啥是Descriptor、页表项、entry、条目、页表条目? Descriptor的格式是怎样的?每一个属性位是怎样的?MMU除了完成地址转换,属性权限的控制/cache的缓存策略是怎样配置的?optee中使用MMU的示例MMU深度思考篇:开启MMU瞬间可能出现的问题以及多种常用的解决方案。注意这里提到的是多种方案,绝大多数人只知道第一种,除此之外还有没有其它的设计方式? MMU关闭时cache的缓存策略会怎样?【思考】01、一个大系统中有多少个MMU ?02、一个ARM Core中有多少个Translation regime?03、EL1&0 Translation regime Stage2、EL2 Translation regime stage1、EL2&0 Translation regime stage1 这三者的区别是什么?04、TTBR1_EL2寄存器有啥特殊性,这个寄存器是给谁使用的?05、有没有TTBR1_EL3寄存器?为什么?06、什么是memory-map? 一个ARM的系统中,有几套物理地址空间?07、页表到底有几级? 页表最少可以有几级?页表最多可以有几级?08、页表有多大? 页表存放在哪里?页表由谁来管理?09、页表是否能放在cache中?10、什么是Translation Table walk? 什么是TLB?11、请简述页表查询的过程?12、在一个大系统中,物理地址是多少位的? 物理地址是多少位指的是什么?虚拟地址又是多少位的? 物理地址的位数和虚拟地址的位数都是由谁来决定的?13、请说明entry、descriptor、页表项、条目 这个四个词汇的由来?14、TCR中有缓存属性和共享属性、页表的entry中也有缓存属性和共享属性,这俩有什么区别?15、请简述TTBR0和TTBR1的概念和意义?16、请简述cacheability和shareability属性的含义?17、stage1和stage2有何区别?18、stage1和stage2的descriptor中,有很多重复的属性,当两者属性有冲突了怎么办?19、L1、L2、L2的descriptor中也有部分相同的属性,重复时怎么办?20、Descriptor的格式有哪几种?21、Descriptor的类型有哪几种?22、简述您所观察到的系统软件中(操作系统或hypervisor)的shareability和cacheability一般都是怎样配置的?23、开启一个MMU的步骤是怎样的?24、啥是flat map? 啥是full level table?25、页表中的AF属性位、DBM属性位分别是干啥的?26、页表中的nG属性位是干啥的?27、页表中的Contiguous属性位是干啥的?28、在开启MMU的瞬间会考虑哪些事情?【课程目录】当前21节课,6.8小时

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧