我的图片不能连续滚动,是什么问题
<table width="800" height="134" border="0" align="center" cellpadding="0" cellspacing="0"><tr>
<td><style type="text/css">
<!--
#demo {
background: #FFF;
overflow:hidden;
width: 800px;
}
#demo img {
}
#indemo {
float: left;
width: 800%;
}
#demo1 {
float: left;
}
#demo2 {
float: left;
}
-->
</style>
<div id="demo">
<div id="indemo">
<%
set rs=server.CreateObject("adodb.recordset")
sql="select top 5 * from tab_chanpin where hot=1 order by o_orders desc"
rs.open sql,conn,1,1
i=0
while not rs.eof and not rs.bof
if rs("pic_url")<>"" then
pic_url=rs("pic_url")
else
pic_url="../bookpic/nopic.gif"
end if
%>
<div id="demo1">
<table width="200" height="127" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="8" height="8"></td>
<td height="8"></td>
<td width="7" height="8"></td>
</tr>
<tr>
<td width="8"></td>
<td height="90" align="center">
<a href="detail_pro.asp?id=<%=rs("id")%>"><img src="<%=replace(pic_url,"../","")%>" alt="" border="0" onload="javascript:DrawImage(this,220,160);"></a>
</td>
<td width="7"></td>
</tr>
<tr>
<td></td>
<td height="8" ></td>
<td></td>
</tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="24" align="center"><a class="link_black" href="detail_pro.asp?id=<%=rs("id")%>"><%=Left((rs("name")),20)%></a></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
</table>
</div>
<%
rs.movenext
i=i+1
if i=4 then
i=0
%>
<div id="demo2"></div>
<%
end if
wend
rs.close
set rs=nothing
%>
</div>
</div>
<script>
<!--
var speed=30;
var tab=document.getElementById("demo");
var tab1=document.getElementById("demo1");
var tab2=document.getElementById("demo2");
tab2.innerHTML=tab1.innerHTML;
function Marquee(){
if(tab2.offsetWidth-tab.scrollLeft<=0)
tab.scrollLeft-=tab1.offsetWidth
else{
tab.scrollLeft++;
}
}
var MyMar=setInterval(Marquee,speed);
tab.onmouseover=function() {clearInterval(MyMar)};
tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};
-->
</script></td>
</tr>
</table>