发信人: marsz()
整理人: microant(1999-08-02 12:13:18), 站内信件
|
实例:循环播放的图片和链接
适用浏览器:ALL( IE4+ Best)
说明:这个效果将产生循环播放的图片,并可更改图片链接(也就是动态的连结 ),你可以调整适当的图片数量和播放速度,这个脚本在所有的浏览器中都会工 作,但是Netscape Navigator无法看到图片转换时得淡入淡出效果。COOL!
第一步:将下列代码复制到网页的Head和Body标记中间。
<script language="JavaScript1.2">
/*
modified by mars 1999 , www.joysoft.net
*/
function reapply(){
setTimeout("slideit()",2000)
return true
}
window.onerror=reapply
</script>
<script language="JavaScript1.1">
<!--var image1=new Image()image1.src="firstimage.gif"var image2=new Im age()image2.src="second.gif"var image3=new Image()image3.src="third.gi f"//-->
</script>
第二步:将下列代码放置你的网页中。
<a href="javascript:slidelink()" onMouseover="window.status='精彩的飞翔 鸟网站!';return true" onMouseout="window.status=''"><img src="firstima ge.gif" name="slide" border=0 style="filter:blendTrans(duration=3)"></ a>
<script>
<!--////可更改图片数量var number_of_images=3//可更改图片往复的速度(更 改speed的数值)var speed=3var step=1var whichimage=1function slideit() {if (!document.images)returnif (document.all)slide.filters.blendTrans. apply()document.images.slide.src=eval("image"+step+".src")if (document .all)slide.filters.blendTrans.play()whichimage=stepif (step<number_of_ images)step++elsestep=1if (document.all)setTimeout("slideit()",speed*1 000+3000)elsesetTimeout("slideit()",speed*1000)}function slidelink(){i f (whichimage==1)window.location="http://www.joysoft.net"else if (whic himage==2)window.location="http://www.pcbirds.com"else if (whichimage= =3)window.location="http://cvbu.yeah.net"}//-->
</script>
第三步:将 onLoad="slideit()" 添加到<body>标记中。(如<body onLoad="sl ideit()">)
-- ________________________________________________
欢迎访问飞翔鸟软体驿站: HTTP://JOYSOFT.SOIM.NET
BEST REGUARDS, MARS MAILTO:[email protected]
※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 210.74.177.242]
|
|