求解:我做网站首页图片无缝轮转图,但是总是转一圈就不动了,下面代码,求高人指点
<div id="aa" style="overflow: hidden; width: 766px; color: #ffffff;"><table cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="demo1" valign="top" align="center">
<table cellpadding="4" cellspacing="0" border="0" width="760">
<tr align="center">
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</tr>
</table>
</td>
<td id="demo2" valign="top">
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var speed=25//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-aa.scrollLeft<=0)
aa.scrollLeft-=demo1.offsetWidth
else{
aa.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
aa.onmouseover=function() {clearInterval(MyMar)}
aa.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>