<div class="w705" id="rolllink" style="overflow: hidden; width:705px; height:120px">
                    <!--宽:705px 高:120px 放5条信息 行高22px 图片大小:120_90px -->
                     <div id="rolllink1">
                      <asp:DataList ID="DLfilm" runat="server" Font-Size="12px" RepeatDirection="Horizontal" Width="">
                        <ItemTemplate>
                          <asp:Image ID="filmpic" style="" Height="90" Width="120" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"hecheng") %> ' />
                          <asp:HyperLink ID="filmname" Height="24" Width="125" runat="server" NavigateUrl='<%# "****?InfoID=" + Eval("proid") %>' Text='<%# getfilm(DataBinder.Eval(Container.DataItem,"proname")) %>'></asp:HyperLink>
                        </ItemTemplate>
                   </asp:DataList>
                 </div>
                 <div id="rolllink2">
                     </div>
                 </div>
                    <script type="text/javascript">
                       var rollspeed=30
                       rolllink2.innerHTML=rolllink1.innerHTML //克隆rolllink1为rolllink2
                       function Marquee1(){
                         if(rolllink2.offsetWidth-rolllink.scrollLeft<=0) //当滚动至rolllink1与rolllink2交界时
                            rolllink.scrollLeft-= rolllink1.offsetWidth //rolllink跳到最顶端
                         else{
                            rolllink.scrollLeft++
                             } 
                          } 
                          var MyMar1=setInterval(Marquee1,rollspeed) //设置定时器
                          rolllink.onmouseover=function() {clearInterval(MyMar1)}//鼠标移上时清除定时器达到滚动停止的目的
                          rolllink.onmouseout=function() {MyMar1=setInterval(Marquee1,rollspeed)}//鼠标移开时重设定时器
                   </script>
                   

解决方案 »

  1.   

    个人觉得 
    html的显示速度 最大的影响在于 创建控件
    所以我认为不要//克隆rolllink1为rolllink2
    而是计算出他的回滚位置 然后设置
    现在你的信息量不是很大 可能看不出来
    数据多了 肯定一跳一跳的
      

  2.   

    代码没问题应该好使 或者你直接用html的  MARQUEE 实现滚动
    <MARQUEE onmouseover="this.stop()" onmouseout="this.start()" scrollAmount="2" scrollDelay="80" direction="left" width="200" height="100">滚动内容</MARQUEE>