可以上往下或下往上的图片新闻代码

来源:百度知道 编辑:UC知道 时间:2024/06/04 03:04:48
就是想让网页的左侧能够以图片为主的新闻不断从上或下滚动

<!--#include file="conn.asp"-->
<marquee behavior=scroll direction=down width=225 height=150 scrollamount=2 scrolldelay=60 onMouseOver='this.stop()' onMouseOut='this.start()' >
<table width="225" border="0" cellspacing="0" cellpadding="0">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from 表名 order by id desc"
rs.open sql,conn,1,3
while not rs.eof
%>
<tr><td align=left valign=top class=nan12 colspan=1>
<a href="#" target="_blank"><%=rs("pic")%></a><br>
</td></tr>
<%
rs.movenext
wend
rs.close
%>
</table>
</marquee>