照这个改一下数据库连接和字段名就行了!其它别动!
<div id=demo style="overflow:hidden;width:1000px;height:125px;border:0px solid #fff;padding-bottom:2px;">
<table align=left cellpadding="0" cellspace="0" border=0>
<tr>
<td id="demo1" valign=top><table width="1000" height="120" border="0" align="left" cellpadding="2" cellspacing="2">
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from news where len(firstImageName)>5 and cataid=12 and linkid=1 order by id desc"
rs.Open sql,conn,1,1
if rs.bof and rs.eof then
response.Write " "
else
%>
<tr>
<% for i=1 to 8%>
<td align="center" valign="middle" title="<%=rs("title")%>" width="150" style="line-height:22px;"><div style="border:solid 1px #666; width:134px; padding:2px;"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank"><img src="admin/eWebEditor/UploadFile/<%=rs("firstImageName")%>" width="130" height="90" border="0"/></a></div>
<%=rs("title")%>
</td>
<% rs.movenext
if rs.eof then exit for
next
%>
</tr>
<%
rs.close
end if
%>
</table></td>
<td id="demo2" valign=top height="0"></td>
</tr>
</table>
</div>
<script>
var speed=15
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>