<body onload="x.stop()">
<marquee id=x behavior=scroll  scrollamount="2" width="150" onmouseover="this.stop()" onmouseout="this.start()">让文字默认停止.鼠标移上才动.</marquee>
</body>

解决方案 »

  1.   

    <body onload="x.stop()">
    <marquee id=x behavior=scroll  scrollamount="2" width="150" onmouseover="this.start()" onmouseout="this.stop()">让文字默认停止.鼠标移上才动.</marquee>
    </body>
      

  2.   


    <div id=demo style=overflow:hidden;height:33;width:200;color:#ffffff>
    <table align=left cellpadding=0 cellspace=0 border=0>
    <tr>
    <td id=demo1 valign=top nowrap>让文字默认停止.鼠标移上才动.让文字默认停止.鼠标移上才动.让文字默认停止.鼠标移上才动.让文字默认停止.鼠标移上才动.让文字默认停止.鼠标移上才动.让文字默认停止.鼠标移上才动.
    </td>
    <td id=demo2 valign=top></td>
    </tr>
    </table>
    </div><script>
    var speed=30
    demo2.innerHTML=demo1.innerHTML
    function Marquee(){
    if(demo2.offsetWidth-demo.scrollLeft<=0)
    demo.scrollLeft-=demo1.offsetWidth
    else{
    demo.scrollLeft++
    }
    }
    var MyMar
    demo.onmouseout=function() {clearInterval(MyMar)}
    demo.onmouseover=function() {MyMar=setInterval(Marquee,speed)}
    </script>
      

  3.   

    <body onload="x.stop()">
    <marquee id=x behavior=scroll  scrollamount="2" width="150" onmouseover="this.start()" onmouseout="this.stop()">让文字默认停止.鼠标移上才动.</marquee>
    </body>
    这种默认看不到原来的文字.是空的
      

  4.   

    marquee 就是怎么定义的,你可以用第二个方法
      

  5.   

    <div id=demo style=overflow:hidden;height:33;width:200;color:#ffffff>
    <table align=left cellpadding=0 cellspace=0 border=0>
    <tr>
    <td id=demo1 valign=top><nobr>动的标题代码你要在asp里
    </td>
    <td id=demo2 valign=top></td>
    </tr>
    </table>
    </div><script>
    var speed=30
    demo2.innerHTML=demo1.innerHTML
    demo1.style.paddingLeft="100px"
    function Marquee(){
    if(demo2.offsetWidth-demo.scrollLeft<=0)
    {
    demo.scrollLeft-=demo1.offsetWidth
    }
    else{
    demo.scrollLeft++
    }
    }
    var MyMar
    demo.onmouseout=function() {clearInterval(MyMar)}
    demo.onmouseover=function() {MyMar=setInterval(Marquee,speed)}
    </script>
      

  6.   

    <body>
    <div id=demo style="overflow:hidden;height:33;width:200;color:#ffffff" onmouseout="clearInterval(MyMar)" onmouseover="MyMar=setInterval(Marquee,speed)">
    <table align=left cellpadding=0 cellspace=0 border=0>
    <tr>
    <td id=demo1 valign=top><nobr>动的标题代码你要在asp里
    </td>
    <td id=demo2 valign=top></td>
    </tr>
    </table>
    </div><script>
    var MyMar=null
    var speed=30
    document.getElementById("demo2").innerHTML=document.getElementById("demo1").innerHTML
    document.getElementById("demo1").style.paddingLeft="100px"
    function Marquee(){
    if(document.getElementById("demo2").offsetWidth-document.getElementById("demo").scrollLeft<=0)
    {
    document.getElementById("demo").scrollLeft-=document.getElementById("demo1").offsetWidth
    }
    else{
    document.getElementById("demo").scrollLeft++
    }
    }</script>
    </body>
      

  7.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head>
    <body>
    <div id=demo style="overflow:hidden;height:33;width:200;color:#ffffff" onmouseout="clearInterval(MyMar)" onmouseover="MyMar=setInterval(Marquee,speed)">
    <table align=left cellpadding=0 cellspace=0 border=0>
    <tr>
    <td id=demo1 valign=top><nobr>动的标题代码你要在asp里
    </td>
    <td id=demo2 valign=top></td>
    </tr>
    </table>
    </div><script>
    var MyMar=null
    var speed=30
    document.getElementById("demo2").innerHTML=document.getElementById("demo1").innerHTML
    document.getElementById("demo1").style.paddingLeft="100px"
    function Marquee(){
    if(document.getElementById("demo2").offsetWidth-document.getElementById("demo").scrollLeft<=0)
    {
    document.getElementById("demo").scrollLeft-=document.getElementById("demo1").offsetWidth
    }
    else{
    document.getElementById("demo").scrollLeft++
    }
    }</script>
    </body>
    </html>
    不行,文字不动.
      

  8.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">删除