从数据库中读出数据,有可能是图片名称,在页面中从左到右连续封闭滚动,
求具体代码,立即结贴!

解决方案 »

  1.   

    <marquee><%# DataBinder.Eval(Container.DataItem, "ColumnYouNeed") %></marquee>;;
      

  2.   

    concealMoon(while(学习){思考;}) 兄弟啊:
    你的代码不能实现封闭滚动,会出现空白区啊
      

  3.   

    <div id="marquees">
    <table width="210" height="300" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="30"></td>
    </tr>
    <tr>
    <td valign="top"><asp:Label ID="ShowGGao" style="WORD-BREAK:break-all;WORD-WRAP:break-word" Runat="server"></asp:Label></td>
    </tr>
    </table>
    </div>
    <script language="JavaScript">
    marqueesHeight=300;
    stopscroll=false;
    with(marquees){
    style.width=0;
    style.height=marqueesHeight;
        style.overflowX="visible";
    style.overflowY="hidden";
    noWrap=true;
    onmouseover=new Function("stopscroll=true");
        onmouseout=new Function("stopscroll=false");
    }
    document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');
        preTop=0; currentTop=0;
        
        function init(){
       templayer.innerHTML="";
       while(templayer.offsetHeight<marqueesHeight){
       templayer.innerHTML+=marquees.innerHTML;
    }
    marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
    setInterval("scrollUp()",40);
    }
    document.body.onload=init;

    function scrollUp(){
    if(stopscroll==true) return;
    preTop=marquees.scrollTop;
        marquees.scrollTop+=1;
    if(preTop==marquees.scrollTop){
    marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
    marquees.scrollTop+=1;
    }
    }
    </script>
      

  4.   

    楼上的兄弟,我要的是封闭滚动啊,不能出现空白的,并且是做成ASCX控件的