天天躁日日躁狠狠躁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)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产99精品视频 | 精品久久久久久久国产潘金莲 | 美女的让男人桶爽网站 | 乱子伦在线观看中文字幕 | 国产成人啪精品视频免费网 | 俄罗斯美幼 | 经典三级四虎在线观看 | 国产强奷糟蹋漂亮邻居在线观看 | a级男女性高爱潮高清试看 A级毛片无码久久精品免费 | 动漫成年美女黄漫网站 | 人妻久久久精品99系列AV | a在线观看免费视频 | 亚洲精品91 | 伊人天天躁夜夜躁狠狠 | www亚洲欲色成人久久精品 | 超碰高清熟女一区二区 | 久久aa毛片免费播放嗯啊 | 国产女人与黑人在线播放 | 久久久久久久久久综合情日本 | 欧美美女论坛 | 狠狠干2022 | 国产在线精品视亚洲不卡 | [高清无码] 波多野结衣| TIMI1TV天美传媒在线观看 | 高h肉肉乳共妻 | 欧洲-级毛片内射八十老太婆 | 亚洲福利电影一区二区? | 日韩欧美视频一区二区在线观看 | 青青草国产偷拍在线av | 诱人的女邻居9中文观看 | 久久精品亚洲牛牛影视 | 国产成人免费片在线视频观看 | 日本精品在线观看视频 | 久久久久久久久久综合情日本 | 国产97碰免费视频 | 伊人久久大线蕉香港三级 | 含羞草在线 | 午夜免费无码福利视频麻豆 | 国产成人精品午夜福麻豆报告 | 把腿张开再深点好爽宝贝 | 国产69精品久久久久人妻刘玥 |