国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > JavaScript > 正文

類似CSDN圖片切換效果腳本

2024-05-06 14:13:54
字體:
供稿:網(wǎng)友
代碼如下:
/*---------------------------------------------------------------------------*/
| Subject: Rotate AD
| NameSpace: System.Web.UI.WebControls.MzRotateImage
| Author: meizz
| Created: 2006-11-11
| Version: 2006-12-06
|-----------------------------------
| MSN: huangfr@msn.com 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 +"'/>");
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表

圖片精選

主站蜘蛛池模板: 壤塘县| 平凉市| 南川市| 阿图什市| 舟曲县| 应用必备| 碌曲县| 海门市| 白朗县| 平安县| 天长市| 简阳市| 滦平县| 台北县| 贵南县| 建宁县| 新源县| 京山县| 凉城县| 明水县| 九台市| 西丰县| 宁武县| 论坛| 永川市| 揭东县| 武强县| 疏附县| 肃北| 旬邑县| 册亨县| 靖西县| 西和县| 莱西市| 天津市| 宜昌市| 宜宾县| 阳朔县| 和平县| 梅河口市| 澜沧|