- JScript code
<script> var speed = 40 democ2.innerHTML = democ1.innerHTML function Marquee1() { if (democ2.offsetWidth - democ.scrollLeft <= 0) democ.scrollLeft -= democ1.offsetWidth else democ.scrollLeft++ } var MyMar1 = setInterval(Marquee1, speed) democ.onmouseover = function () { clearInterval(MyMar1) } democ.onmouseout = function () { MyMar1 = setInterval(Marquee1, speed) } </script>
这段代码在IE里没问题,可是用Firefox却无法实现滚动,求兼容IE Firefox的滚动方法。
------解决方案--------------------
楼主 参考下
http://www.codefans.net/jscss/code/255.shtml
http://www.lanrentuku.com/js/scroll-139.html