下面的这代码是实现滚动的,但每多出一个记录就会多出一个表格,请问应该怎样才能把所有显示的记录都在一个表格中显示呢??/谢谢 ~~~
<!--#include file="../inc/conn_other.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style3 { color: #000000;
font-size: 9px;
}
.style4 {color: #000000}
-->
</style>
<link href="../../css/1.css" rel="stylesheet" type="text/css">
<link href="../../css/2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(../../images/bg1111.gif);
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body>
<p>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from News where news_type='3' order by News_Date DESC"
rs.open sql,conn,1,1
%>
<table width="201" height="15%" border="0" align="center" cellpadding="0" cellspacing="0">
<% if rs.eof then %>
<tr>
<td width="357" height="20"><div align="center" class="text"><font size="3">暂时没有新闻!!!</font></div></td>
</tr>
<%
else
rs.pagesize=8
totalrecord=rs.recordcount
totalpages=rs.pagecount
maxpages=rs.pagesize
if thepage<1 then
thepage=1
end if
if thepage>totalpages then
thepage=totalpages
end if
if thepage=1 then
showContent
else
if (thepage-1)*maxpages<totalrecord then
rs.move (thepage-1)*maxpages
dim bookmark
bookmark=rs.bookmark
showContent
end if
end if
rs.close
end if
sub showContent
dim i
dim k
k=(totalrecord-maxpages*(thepage-1))+1
i=0
do while not (rs.eof or err)
k=k-1
%>
<tr>
<td height="95" class="text">
<div align="left">
<p>
<marquee direction="up" onMouseOut="this.start()" onMouseOver="this.stop()" scrollamount=3 scrolldelay=100 height=100 width=100>
<a href="../news/News.asp?id=<%=rs("news_id")%>" target="_blank">
<%=left((rs.Fields.Item("News_Title").Value),12)%></a>
</marquee>
</p>
</div></td>
</tr>
<%
i=i+1
if i>=Maxpages then exit do
rs.Movenext
loop
end sub
%>
</table>
<%
set rs=nothing
conn.close
set conn=nothing
%>
</p>
</body>