日期:2014-05-18 浏览次数:20425 次
<div id="demo" style=" height:215px; width:740px;"> <div id="indemo" style=" height:215px;width:740px;"> <div id="demo1" style="background-image:url(Images/bgFilm.gif); height:215px; writing-mode:tb-rl;text-align: center;"> <asp:Repeater ID="Repeater4" runat="server"> <ItemTemplate> <table > <tr> <td> <a href="product_more.aspx?ID=<%#DataBinder.Eval (Container.DataItem,"id")%>"><img src="Admin/upload/<%#DataBinder.Eval(Container.DataItem,"img")%>" width="118px" height="140px" name="img1" alt=""></a></td> </tr> <tr> <td align="center" style="color: #666633; background-image:url(Images/bgRollSpan.gif)"><a href="product_more.aspx?ID=<%#DataBinder.Eval (Container.DataItem,"id")%>"><%#DataBinder.Eval(Container.DataItem,"title")%></a></td> </tr> </table> </ItemTemplate> </asp:Repeater> </div> <div id="demo2"></div> </div> </div>
<script language="javascript" type="text/javascript"> <!-- var speed=15; //数字越大速度越慢 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> 图片滚动正常,但是鼠标放上去不停止,哪位大侠能帮忙解决下啊?