ASP 调用 文字上滚动代码
我想问一下我这个ASP调用要怎么搞,我现在想这一块调用数据库的数据向上滚动.<TDwidth=277><IMGheight=25src="images/gongkai.j...
我想问一下我这个ASP调用要怎么搞,我现在想这一块调用数据库的数据向上滚动.
<TD width=277><IMG height=25
src="images/gongkai.jpg" width=277 useMap=#Map4
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="95%" height="285"
align=center border=0>
<TBODY>
<TR>
<TD valign="middle" height="170">
<table border="0" width="100%">
<%
intPage = 8
Set dbnews = Server.CreateObject("ADODB.Connection")
dbnews.Open strCon
Set rsnews= Server.CreateObject("ADODB.Recordset")
rsnews.ActiveConnection = dbnews
rsnews.Source ="select * from news order by ntime desc "
rsnews.Open , , 3
do while not rsnews.eof
%>
<tr>
<td align="left" width="70%">
<img src="images/dot.gif"> <a href="news/content.asp?newsid=<%= rsnews("newsid") %>" class="newslist" ><%= rsnews("bigtitle") %></a>
</td><td align="center" valign="top">
<font color="#444444"><%= rsnews("ntime") %></font>
</td></tr>
<%
rsnews.movenext
intPage=intPage-1
if intPage=0 then exit do
loop
if intPage=8 then
%>
<td width="100%" colspan="3">该项暂没有内容...</td>
<%else%>
<tr>
<td width="100%" colspan="3" align="right"><a href="news/contentList.asp">更多...</a></td>
</tr>
<%end if%>
</table>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD> 展开
<TD width=277><IMG height=25
src="images/gongkai.jpg" width=277 useMap=#Map4
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="95%" height="285"
align=center border=0>
<TBODY>
<TR>
<TD valign="middle" height="170">
<table border="0" width="100%">
<%
intPage = 8
Set dbnews = Server.CreateObject("ADODB.Connection")
dbnews.Open strCon
Set rsnews= Server.CreateObject("ADODB.Recordset")
rsnews.ActiveConnection = dbnews
rsnews.Source ="select * from news order by ntime desc "
rsnews.Open , , 3
do while not rsnews.eof
%>
<tr>
<td align="left" width="70%">
<img src="images/dot.gif"> <a href="news/content.asp?newsid=<%= rsnews("newsid") %>" class="newslist" ><%= rsnews("bigtitle") %></a>
</td><td align="center" valign="top">
<font color="#444444"><%= rsnews("ntime") %></font>
</td></tr>
<%
rsnews.movenext
intPage=intPage-1
if intPage=0 then exit do
loop
if intPage=8 then
%>
<td width="100%" colspan="3">该项暂没有内容...</td>
<%else%>
<tr>
<td width="100%" colspan="3" align="right"><a href="news/contentList.asp">更多...</a></td>
</tr>
<%end if%>
</table>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD> 展开
1个回答
展开全部
加个marquee标记!
更改后的代码:
<TD width=277><IMG height=25
src="images/gongkai.jpg" width=277 useMap=#Map4
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="95%" height="285"
align=center border=0>
<TBODY>
<TR>
<TD valign="middle" height="170">
<marquee direction="up" scrollAmount="2" scrollDelay="2" onMouseOver="this.stop()" onMouseOut="this.start()">
<table border="0" width="100%">
<%
intPage = 8
Set dbnews = Server.CreateObject("ADODB.Connection")
dbnews.Open strCon
Set rsnews= Server.CreateObject("ADODB.Recordset")
rsnews.ActiveConnection = dbnews
rsnews.Source ="select * from news order by ntime desc "
rsnews.Open , , 3
do while not rsnews.eof
%>
<tr>
<td align="left" width="70%">
<img src="images/dot.gif"> <a href="news/content.asp?newsid=<%= rsnews("newsid") %>" class="newslist" ><%= rsnews("bigtitle") %></a>
</td><td align="center" valign="top">
<font color="#444444"><%= rsnews("ntime") %></font>
</td></tr>
<%
rsnews.movenext
intPage=intPage-1
if intPage=0 then exit do
loop
if intPage=8 then
%>
<td width="100%" colspan="3">该项暂没有内容...</td>
<%else%>
<tr>
<td width="100%" colspan="3" align="right"><a href="news/contentList.asp">更多...</a></td>
</tr>
<%end if%>
</table>
</marquee>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
更改后的代码:
<TD width=277><IMG height=25
src="images/gongkai.jpg" width=277 useMap=#Map4
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="95%" height="285"
align=center border=0>
<TBODY>
<TR>
<TD valign="middle" height="170">
<marquee direction="up" scrollAmount="2" scrollDelay="2" onMouseOver="this.stop()" onMouseOut="this.start()">
<table border="0" width="100%">
<%
intPage = 8
Set dbnews = Server.CreateObject("ADODB.Connection")
dbnews.Open strCon
Set rsnews= Server.CreateObject("ADODB.Recordset")
rsnews.ActiveConnection = dbnews
rsnews.Source ="select * from news order by ntime desc "
rsnews.Open , , 3
do while not rsnews.eof
%>
<tr>
<td align="left" width="70%">
<img src="images/dot.gif"> <a href="news/content.asp?newsid=<%= rsnews("newsid") %>" class="newslist" ><%= rsnews("bigtitle") %></a>
</td><td align="center" valign="top">
<font color="#444444"><%= rsnews("ntime") %></font>
</td></tr>
<%
rsnews.movenext
intPage=intPage-1
if intPage=0 then exit do
loop
if intPage=8 then
%>
<td width="100%" colspan="3">该项暂没有内容...</td>
<%else%>
<tr>
<td width="100%" colspan="3" align="right"><a href="news/contentList.asp">更多...</a></td>
</tr>
<%end if%>
</table>
</marquee>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询