日期:2014-05-16 浏览次数:20324 次
<script>
var speed = 30;
var demo = document.getElementById("move");
var demo1 = document.getElementById("seconde");
var demo2 = document.getElementById("demo2");
demo2.innerHTML = demo1.innerHTML;
function myMarquee() {
if (demo2.offsetWidth - demo.scrollLeft <= 0)
demo.scrollLeft -= demo1.offsetWidth;
else {
demo.scrollLeft++;
}
}
var MyMar = setInterval(myMarquee, speed);
demo.onmouseover = function () { clearInterval(MyMar) }
demo.onmouseout = function () { MyMar = setInterval(myMarquee, speed) }
</script>
function showMarquee()
{
var speed = 30;
var demo = document.getElementById("move");
var demo1 = document.getElementById("seconde");
var demo2 = document.getElementById("demo2");
demo2.innerHTML = demo1.innerHTML;
function myMarquee() {
if (demo2.offsetWidth - demo.scrollLeft <= 0)
demo.scrollLeft -= demo1.offsetWidth;
else {
demo.scrollLeft++;
&