书签 分享 收藏 举报 版权申诉 / 43

类型JS图片效果.docx

  • 文档编号:10064241
  • 上传时间:2023-05-23
  • 格式:DOCX
  • 页数:43
  • 大小:27.41KB

一个不错的幻灯片效果:

DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">

图片播放器

21:

57gmt">

1秒

2秒

3秒

4秒

5秒

6秒

7秒

8秒

9秒

10秒

15秒

20秒

30秒

40秒

50秒

60秒

100秒

200秒

500秒

  播放

700;height:

100%">

--

functionpimsize(imgname,widths,heights){

varw;

varh;

//window.alert(picimg.width);

//window.alert(picimg.height);

w=imgname.width;

h=imgname.height;

if(imgname.width>widths){

do

w=w-1;

while(w>widths);

s=w/imgname.width;

//window.alert(s);

imgname.width=w;

imgname.height=h*s;

h=imgname.height

}

//window.alert(imgname.height);

//window.alert(heights);

if(imgname.height>heights){

do

h=h-1;

while(h>heights);

s=h/imgname.height;

//window.alert(s);

imgname.width=w*s;

imgname.height=heights;

}

}

functionadRotator(){};

adRotator.initialize=function(o)

{

//scriptbyblueDestiny

this._t=newArray();

this._l=newArray();

this._p=newArray();

this._i=newImage();

this._c=0;

this._f=false;

this._o=o;

this._timeout=null;

this._html="";

//configration.

//@imagewidth

//@imageheight

//@rotatorspeed

//@filtertype

this._w=450;

this._h=450;

this._s=4;

this._x=23;

returnthis;

};

adRotator.add=function(p,t,l){with(this)

{

_p.push(p);

_t.push(t);

_l.push(l);

}};

adRotator.load=function(){with(adRotator)

{

if(_i.readyState=='complete')

{

if(_p.length-1==_c)

{

_f=true;

_c=0;

window.clearTimeout(_timeout);

//getRef("AdRotator").innerHTML="complete";

adRotator.play();

}

else

{

_c++;

getRef(_o).innerHTML="totalimages"+_p.length+",loadingpicture"+_c+''+_i.readyState+"...";

_timeout=window.setTimeout(adRotator.load,10)

}

}

else

{

getRef(_o).innerHTML="totalimages"+_p.length+",loadingpicture"+_c+''+_i.readyState+"...";

_timeout=window.setTimeout(adRotator.load,10)

}

}};

adRotator.play=function(){with(adRotator)

{

if(_f)

{

_html="";

_html+='

1pxsolid#333333;width:

100%;height:

100%"align=center>

9pt;font-family:

tahoma;font-weight:

bold;text-align:

Center">'

_html+='

+'style="width:

'+_w+''

+';height:

"'+_h+'"'

+'>'

_html+='

_l[_c]:

"javascript:

void(0);")+'">';

_html+='

//+'width="'+_w+'"'

//+'height="'+_h+'"'

+'onload="pimsize(img,700,550)"'

+(_t[_c]?

'title="'+_t[_c]+'"':

'')

+'style="border:

1pxsolidblue;FILTER:

revealTrans(transition='+_x+',duration=1);"'

+'>';

_html+=(_t[_c]?

(''+(_c+1)+'.'+_t[_c]+'

'):

'');

_html+='';

_html+="";

_html+='';

for(vari=0;i<_p.length;i++)

_html+='

+'style="border:

1pxsolid#333333;padding:

1px5px1px5px;height:

20px;text-align:

center;cursor:

'

+(_c==i?

('default;background-color:

red;"'):

'hand;"onclick="adRotator.select('+i+')"')

+'>'

+(i>8?

(i+1):

('0'+(i+1)))+'';

_html+="";

getRef(_o).innerHTML=_html;

getRef("rotatorPic").filters[0].Apply();

getRef("rotatorPic").filters[0].Play();

next();

}

else

{

_i.src=_p[_c];

adRotator.load();

}

}};

adRotator.next=function(){with(this)

{

(_p.length-1==_c)?

_c=0:

_c++;

_timeout=window.setTimeout(adRotator.play,_s*1000);

}};

adRotator.select=function(i){with(this)

{

window.clearTimeout(_timeout);

_c=i;

adRotator.play();

}};

adRotator.set=function(second){with(this)

{

window.clearTimeout(_timeout);

if((/\d+/).test(second)==true)

{

_s=second;

adRotator.play();

}

else

{

alert("mustbedigit!

")

adRotator.play();

}

}};

functiongetRef(id)

{

return(document.all?

document.all(id):

document.getElementById(id));

}

adRotator.initialize("AdRotator");

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.add("

adRotator.play();

//-->

北京奥运网站的图片轮转效果

DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http:

//www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

--savedfromurl=(0026)-->

lang="zh-CN"

xmlns="http:

//www.w3.org/1999/xhtml">

举报
举报
版权申诉
版权申诉
word格式文档无特别注明外均可编辑修改;预览文档经过压缩,下载后原文更清晰! 立即下载
配套讲稿:

如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

特殊限制:

部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

关 键  词:
JS 图片 效果
提示  冰点文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:JS图片效果.docx
链接地址:https://www.bingdoc.com/p-10064241.html
相关搜索
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2


收起
展开