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

類似CSDN圖片切換效果腳本

復制代碼 代碼如下:
/*---------------------------------------------------------------------------*/
| Subject: Rotate AD
| NameSpace: System.Web.UI.WebControls.MzRotateImage
| Author: meizz
| Created: 2006-11-11
| Version: 2006-12-06
|-----------------------------------
| MSN: [email protected] QQ:112889082 Copyright (c) meizz
| http://www.meizz.com/jsframework/ MIT-style license
| The above copyright notice and this permission notice shall be
| included in all copies or substantial portions of the Software

| Changer: Worm

| AlterDate: 2009-09-15
/*---------------------------------------------------------------------------*/
//Using("System.Data.MzDataProvider");
//Using("System.Web.Forms.MzBehavior");

//node{url, target, summary, img, alt}
function MzRotateImage()
{
MzDataProvider.call(this); this.stateChangeHandle(1);

this.width = 280;
this.height= 187;
this.timer = null;
this.interval = 10000;
this.duration = 2000;
this.activeIndex = 1;
this.currentIndex = 0;
this.floatControlBar = true;
this.useFilter = System.ie && MzBrowser.version>=5.5;
}
MzRotateImage.Extends(MzDataProvider, "MzRotateImage");
System.loadCssFile(System.resourcePath +"/MzRotateImage.css", "MzRotateImage_CSS");

MzRotateImage.prototype.render=function()
{
this.dataInit(); this.images=new Array();
var d = this.nodes = this.rootNode.childNodes;

for(var i=0; i<d.length; i++)
{
this.images[i] = new Image();
this.images[i].src = d[i].get("img");
}

var id=this.id="MzRotateImage_"+this.hashCode,s=[];
var width = this.width = parseInt(this.width);
var height = this.height = parseInt(this.height);

s.push("<div id='"+id+"' style='width:"+width+"px;' class='MzRotateImage'>");
s.push("<div id='"+id+"_ImageBox' class='MzRotateImage_ImageBox' style='height:"+ height +"px'>");
if(this.useFilter) { if(d.length>0) //filter: revealTrans
{
var alt = d[0].get("alt"), src = this.images[0].src;
s.push("<a href='#'><img alt='"+ alt +"' src='"+src+"' ");if(d.length>1)
s.push("style='filter:revealTrans(duration="+(this.duration/1000)+")'");
s.push(" id='"+ id +"_img' style='border: none' width="+this.width+" height="+this.height+" />");
s.push("<div id='"+ id +"_div' style='width: "+ width +"px; height:25px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;cursor:hand;' align='center' >"+alt+"</div></a>");

}
}
else { for(i=0; i<d.length; i++) //new MzBehavior.Rotate()
{
s.push("<div id='"+id+"_item_"+i+"' style='width: "+width+"px;");
if (i>0) s.push(" display: none;");
s.push(" height: "+ height +"px; overflow: hidden;'>");
s.push("<a href='"+ (d[i].get("url") || "#")+"'");
s.push(" target='"+ (d[i].get("target") || "_self") +"'>");
s.push("<img alt='"+(d[i].get("alt") || "") +"'");
s.push(" src='"+ this.images[i].src +"'/>");
s.push("<div style='width: "+ width +"px; height:25px;cursor:hand;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;' align='center' >"+d[i].get("alt")+"</div></a></div>");
}
}
s.push("</div><div style='width: "+ width +"px; ");
s.push((this.floatControlBar?"margin-top: -48px":"") +"' ");
s.push(" id='"+id+"_ControlBar' class='MzRotateImage_ControlBar'>");
for(i=0;i<d.length;i++)s.push("<input type='button' style='background-color: #99cccc; cursor:hand; border-right: #ffffcc 1px solid; border-top: #ffffcc 1px solid; border-left: #ffffcc 1px solid; width: 20px; border-bottom: #ffffcc 1px solid;' value='"+(i+1)+"'/>");
s.push("</div>"); s.push("</div>"); s = s.join("");
this.stateChangeHandle(2); this._onload();
return s;
};

MzRotateImage.prototype.stateChangeHandle=function(n)
{
this.readyState = n||0;
this.dispatchEvent(new System.Event("onreadystatechange"));
};
MzRotateImage.prototype._onload=function()
{
var me=this;
if(MzElement.check(this.id))
{
this.stateChangeHandle(4);

if(this.useFilter) this.timer=
setTimeout(function(){me.filter();}, me.interval+me.duration);
else
{
this._rotate = new MzBehavior.Rotate(me.id +"_ImageBox",
{interval:me.interval,duration:me.duration});
this._rotate.addEventListeners("onchange", function(e)
{
me.activeIndex = e.target.activeIndex;
me.currentIndex = e.target.currentIndex;
e= new System.Event("onchange"); e.target=me;
me.dispatchEvent(e);
});
}

var A = MzElement.check(this.id+"_ControlBar").getElementsByTagName("INPUT");
A[this.currentIndex].className = "active";

this.addEventListeners("onchange", function(e)
{
for(var i=0; i<A.length; i++) A[i].className="";
if(A.length>1)
{
A[e.target.activeIndex].className = "active";
}
else
{
A[0].className = "active";
}
});

for(var i=0; i<A.length; i++)
{
var f=new Function("Instance('"+ this.hashCode +"').focus("+ i +")");
A[i].onmouseover = f; A[i].onclick = f;
}
}
else setTimeout(function(){me._onload();}, 10);
};

MzRotateImage.prototype.focus=function(n)
{
clearTimeout(this.timer);
if(this.useFilter){this.activeIndex=n; this.filter();}
else if(this._rotate) this._rotate.focus(n);
};
MzRotateImage.prototype.filter=function()
{
var me = this;

if(me.dispatchEvent(new System.Event("onchange")))
{
var img;
if(img=MzElement.check(me.id +"_img"))
{
var a = img.parentNode;
var N;
if(me.nodes.length==1)
N=0
else
N=me.activeIndex;

this.currentIndex = N;
this.activeIndex = N+1>=me.nodes.length ? 0 : N+1;
var dv=MzElement.check(me.id +"_div");
dv.innerText=me.nodes[N].get("alt");

a.href = (me.nodes[N].get("url") || "#");
a.target = (me.nodes[N].get("target") || "_self");
img.src=me.images[N].src;
img.alt=me.nodes[N].get("alt");
if(me.nodes.length >1)
{
img.filters.revealTrans.Transition=23;
img.filters.revealTrans.apply();
img.filters.revealTrans.play();
}
}
}
me.interval = 5000;
this.timer=setTimeout(function(){me.filter();}, me.interval+me.duration);
};

JavaScript技術類似CSDN圖片切換效果腳本,轉載需保留來源!

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

主站蜘蛛池模板: 国产女高清在线看免费观看 | 日韩影院久久 | 国产激情文学 | 日本少妇无码精品12P | 国产精品A久久久久久久久 国产精品A久久777777 | 国产精品人妻无码久久久蜜桃臀 | 在线亚洲视频无码天堂 | 一本之道高清视频在线观看 | 国产亚洲精品视频亚洲香蕉视 | 刺激性视频黄页 | 国产传媒精品1区2区3区 | 亚洲日韩天堂在线中文字幕 | 欧美高清另类video | 欧美手机在线播放 | 日本三级床震 | 国产精品久免费的黄网站 | 国产国产人免费观看在线视频 | 风月宝鉴之淫乱英雄传 电影 | 国产免费69成人精品视频 | 三级黄色在线视频 | 国产精品大陆在线视频 | 免费在线视频一区 | 青草国产超碰人人添人人碱 | 国产99精品视频 | 麻豆成人啪啪色婷婷久久 | 最近2019年日本中文免费字幕 | 偷拍久久国产视频免费 | 亚洲国产AV精品一区二区蜜芽 | 丰满五十老女人性视频 | 精品伊人久久久 | 高傲教师麻麻被同学调教123 | 美女被C污黄网站免费观看 美女白虎穴 | 麻豆国产人妻精品无码AV | 日本精品卡一卡2卡3卡四卡三卡 | 99re5.久久热在线视频 | 国产三区在线成人AV | 久久噜国产精品拍拍拍拍 | nxgx69日本护士 | 久久大香萑太香蕉av | 黄色a三级三级三级免费看 黄色a三级免费看 | 国产免费人成在线看视频 |