<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<div id="demo" style="overflow:hidden;height:33;width:500;background:#214984;color:#ffffff; border:1px solid red">
<table align="left" cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="demo1" valign="top">
<img src="http://www.baidu.com/img/baidu_logo.gif">
<img src="http://www.baidu.com/img/baidu_logo.gif">
<img src="http://www.baidu.com/img/baidu_logo.gif">
<img src="http://www.baidu.com/img/baidu_logo.gif">
<img src="http://www.baidu.com/img/baidu_logo.gif">
</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=setInterval(Marquee,speed)
  demo.onmouseover=function() {clearInterval(MyMar)}
  demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
  </script> </body>
</html>

解决方案 »

  1.   

    IE下确实是向左滚动的。
    FF下有不少的错误。
      

  2.   

    <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=setInterval(Marquee,speed) 
      demo.onmouseover=function() {clearInterval(MyMar)} 
      demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
      </script> 换成<script> 
    var demo=document.getElementById("demo").
    var demo1=document.getElementById("demo1").
    var demo2=document.getElementById("demo2")
      var speed=30 
      demo2.innerHTML=demo1.innerHTML 
      function Marquee() 
      { 
    if(demo2.offsetWidth-demo.scrollLeft <=0) 

    demo.scrollLeft-=demo1.offsetWidth 

    else 

    demo.scrollLeft++ 

      } 
      var MyMar=setInterval(Marquee,speed) 
      demo.onmouseover=function() {clearInterval(MyMar)} 
      demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
      </script> 
      

  3.   

    兼容FF,JS不间断循环滚动,包含自滚动,左右自滚动,点击左右滚动,鼠标暂停效果 :
    http://blog.csdn.net/chinmo/archive/2008/09/12/2915629.aspx
      

  4.   

    于娜大妈~~~给大妈看一眼,傻了....http://www.efectorelativo.net/laboratory/noobSlide/