// 视频 var videos = document.getelementbyid("video"); $(".video-btn").click(function() { console.log(1); $(".video-bg").fadein(500); videos.play(); }) $(".alerts").click(function() { $(".video-bg").fadeout(500); videos.pause(); }); // 第2屏滚动 (function() { var odiv = document.getelementbyid("marquee"); var oul = odiv.getelementsbytagname('ul')[0]; var ali = oul.getelementsbytagname('li'); var speed = -1; oul.innerhtml += oul.innerhtml; oul.style.width = ali[0].offsetwidth * ali.length + 'px'; function move() { if (oul.offsetleft < -oul.offsetwidth / 2) { oul.style.left = '0'; } if (oul.offsetleft > 0) { oul.style.left = -oul.offsetwidth / 2 + 'px'; } oul.style.left = oul.offsetleft + speed + 'px'; } var timer = setinterval(move, 40); odiv.onmouseover = function() { clearinterval(timer); }; odiv.onmouseout = function() { timer = setinterval(move, 40); }; })(); // 第3屏滚动 (function() { var odiv = document.getelementbyid("marquee2"); var oul = odiv.getelementsbytagname('ul')[0]; var ali = oul.getelementsbytagname('li'); var speed = -1; oul.innerhtml += oul.innerhtml; oul.style.width = ali[0].offsetwidth * ali.length + 'px'; function move() { if (oul.offsetleft < -oul.offsetwidth / 2) { oul.style.left = '0'; } if (oul.offsetleft > 0) { oul.style.left = -oul.offsetwidth / 2 + 'px'; } oul.style.left = oul.offsetleft + speed + 'px'; } var timer = setinterval(move, 40); odiv.onmouseover = function() { clearinterval(timer); }; odiv.onmouseout = function() { timer = setinterval(move, 40); }; })();