你这个能停止一个计时器吧?
你为ID为demo的元素两次添加onmouseover事件
第二次会覆盖第一次,你可以把停止两个计时器的代码写在一个事件里

解决方案 »

  1.   

    给你一个js插件 js文字无缝左右滚动,可添加多个DIV
      

  2.   

    你的tab和taby指的是同一个,为他们添加的不同的onmouseover事件,他只会执行最后的那个
    你可以为你的id为indemo的这个div添加onmouseover事件,不过这两个div的id需要更改一下,改成indemo1和indemo2.即不能重复,现在只需要分别赋上事件就行了var d1 = document.getElementById('indemo1'); 
    d1.onmouseover = function() {
    clearInterval(MyMar1);
    };
    d1.onmouseout = function() {
    MyMar1 = setInterval(Marquee1, speed1);
    };
    var d2 = document.getElementById('indemo2'); 
    d2.onmouseover = function() {
    clearInterval(MyMar1);
    };
    d2.onmouseout = function() {
    MyMar1 = setInterval(Marquee1, speed1);
    };