天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

javascript上下左右定時滾動插件

核心代碼:
復(fù)制代碼 代碼如下:
<script type="text/Javascript">
function Marquee() {
this.ID = document.getElementById(arguments[0]);
this.Direction = arguments[1];
this.Step = arguments[2];
this.Width = arguments[3];
this.Height = arguments[4];
this.Timer = arguments[5];
this.WaitTime = arguments[6];
this.StopTime = arguments[7];
if (arguments[8]) { this.ScrollStep = arguments[8]; } else { this.ScrollStep = this.Direction > 1 ? this.Width : this.Height; }
this.CTL = this.StartID = this.Stop = this.MouseOver = 0;
this.ID.style.overflowX = this.ID.style.overflowY = "hidden";
this.ID.noWrap = true;
this.ID.style.width = this.Width;
this.ID.style.height = this.Height;
this.ClientScroll = this.Direction > 1 ? this.ID.scrollWidth : this.ID.scrollHeight;
this.ID.innerHTML += this.ID.innerHTML;
this.Start(this, this.Timer, this.WaitTime, this.StopTime);
}
Marquee.prototype.Start = function(msobj, timer, waittime, stoptime) {
msobj.StartID = function() { msobj.Scroll(); }
msobj.Continue = function() {
if (msobj.MouseOver == 1) { setTimeout(msobj.Continue, waittime); }
else { clearInterval(msobj.TimerID); msobj.CTL = msobj.Stop = 0; msobj.TimerID = setInterval(msobj.StartID, timer); }
}
msobj.Pause = function() { msobj.Stop = 1; clearInterval(msobj.TimerID); setTimeout(msobj.Continue, waittime); }
msobj.Begin = function() {
msobj.TimerID = setInterval(msobj.StartID, timer);
msobj.ID.onmouseover = function() { msobj.MouseOver = 1; clearInterval(msobj.TimerID); }
msobj.ID.onmouseout = function() { msobj.MouseOver = 0; if (msobj.Stop == 0) { clearInterval(msobj.TimerID); msobj.TimerID = setInterval(msobj.StartID, timer); } }
}
setTimeout(msobj.Begin, stoptime);
}
Marquee.prototype.Scroll = function() {
switch (this.Direction) {
case 0:
this.CTL += this.Step;
if (this.CTL >= this.ScrollStep && this.WaitTime > 0) { this.ID.scrollTop += this.ScrollStep + this.Step - this.CTL; this.Pause(); return; }
else { if (this.ID.scrollTop >= this.ClientScroll) this.ID.scrollTop -= this.ClientScroll; this.ID.scrollTop += this.Step; }
break;
case 1:
this.CTL += this.Step;
if (this.CTL >= this.ScrollStep && this.WaitTime > 0) { this.ID.scrollTop -= this.ScrollStep + this.Step - this.CTL; this.Pause(); return; }
else { if (this.ID.scrollTop <= 0) this.ID.scrollTop += this.ClientScroll; this.ID.scrollTop -= this.Step; }
break;
case 2:
this.CTL += this.Step;
if (this.CTL >= this.ScrollStep && this.WaitTime > 0) { this.ID.scrollLeft += this.ScrollStep + this.Step - this.CTL; this.Pause(); return; }
else { if (this.ID.scrollLeft >= this.ClientScroll) this.ID.scrollLeft -= this.ClientScroll; this.ID.scrollLeft += this.Step; }
break;
case 3:
this.CTL += this.Step;
if (this.CTL >= this.ScrollStep && this.WaitTime > 0) { this.ID.scrollLeft -= this.ScrollStep + this.Step - this.CTL; this.Pause(); return; }
else { if (this.ID.scrollLeft <= 0) this.ID.scrollLeft += this.ClientScroll; this.ID.scrollLeft -= this.Step; }
break;
}
}
</script>

控制使用代碼:
復(fù)制代碼 代碼如下:
<script type="text/Javascript">
<!--
window.onload = function() {
new Marquee(
"s1", //容器ID
0, //向上滾動(0向上 1向下 2向左 3向右)
2, //滾動的步長
251, //容器可視寬度
520, //容器可視高度
50, //定時器 數(shù)值越小,滾動的速度越快(1000=1秒,建議不小于20)
2000, //間歇停頓時間(0為不停頓,1000=1秒)
3000, //開始時的等待時間(0為不等待,1000=1秒)
75 //間歇滾動間距(可選),可理解為行高,我這里是3*25=75,就是每次滾動三行
);
};
-->
</script>

效果演示:

[Ctrl+A 全選 注:如需引入外部Js需刷新才能執(zhí)行]

JavaScript技術(shù)javascript上下左右定時滾動插件,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 亚洲成人综合在线 | 在线精品视频免费观看 | 一本色道久久综合一区 | 胸大的姑娘中文字幕视频 | 亚洲地址一地址二地址三 | 99久热这里精品免费 | 色婷婷五月综合久久中文字幕 | 手机看片成人 | 美女一级毛片免费不卡视频 | 内射后入在线观看一区 | www.伊人| 久久视频这有精品63在线国产 | 1a级毛片免费观看 | 九色PORNY真实丨首页 | 真人女人无遮挡内谢免费视频% | 99久在线国内在线播放免费观看 | 欧美日韩久久久精品A片 | 亚洲福利电影一区二区? | 成人人观看的免费毛片 | 真人做受120分钟免费看 | 国产成人免费高清视频 | 中文字幕亚洲无线码高清不卡 | 浪货嗯啊趴下NP粗口黄暴 | 欧美成a人片免费看久久 | 国产精品伦理一二三区伦理 | 女人一级毛片免费视频观看 | 麻豆一区二区三区蜜桃免费 | 丫鬟粗大狠狠贯穿h | 国产精品A久久久久久久久 国产精品A久久777777 | 啊…嗯啊好深男男高h文 | 国产亚洲精品久久综合阿香 | 国产视频www | 国产成人无码精品久久久影院 | 菠萝蜜国际一区麻豆 | 精品少妇高潮蜜臀涩涩AV | 国产产乱码一二三区别免费 | 国产网红主播精品福利大秀专区 | 国产精品久久久久激情影院 | 亚洲成在人线视频 | 大胸美女被cao哭 | 3D内射动漫同人资源在线观看 |