var speed = 30
//速度數值越大速度越慢
var colee_right2 = document.getElementById(
"colee_right2");
var colee_right1 = document.getElementById(
"colee_right1");
var colee_right = document.getElementById(
"colee_right");
colee_right2.innerHTML = colee_right1.innerHTML;
function Marquee4() {
// 控制從右向左滾動
if (colee_right.scrollLeft >= colee_right2.offsetWidth)
colee_right.scrollLeft = 0;
else {
colee_right.scrollLeft++;
}
// 控制從左向右滾動
/*
if (colee_right.scrollLeft <= 0)
colee_right.scrollLeft += colee_right2.offsetWidth;
else {
colee_right.scrollLeft--;
}*/
}
var MyMar4 = setInterval(Marquee4, speed);
colee_right. =
function() {
clearInterval(MyMar4);
}
colee_right. =
function() { MyMar4 = setInterval(Marquee4, speed); }