<html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>一例极简洁的JS幻灯特效</title> </head> <body bgcolor="#339999"> <!--********************************************************************************--> <center> <img id="fc" style="filter:revealTrans(); position: relative; left: 0; top: 0; width: 600px; height: 460px" src="http://2010.hnzqw.com/UploadFile/2010-12/201012613594059962.jpg" border="0"> </center> <!--********************************************************************************--> <script language = "JavaScript"> //脚本标签 var pic = new Array(); //图片地址的数组 pic[0] = "201012613594059962.jpg"; pic[1] = "20101261415857643.jpg"; pic[2] = "201012414403266359.jpg"; pic[3] = "20101261413747074.jpg"; pic[4] = "20101241619442251.jpg"; pic[5] = "2010126141725925.jpg"; pic[6] = "20101261402836589.jpg"; pic[7] = "20101261401248119.jpg"; pic[8] = "2010126140226405.jpg"; pic[9] = "201012613595042153.jpg"; <!--------------------------------------------------------------------------------------------------> var k = 1; //用于计数的变量,初始值为1; function slide(){ //命名一个函数; fc.filters.item(0).Apply(); //应用滤镜效果; fc.filters.revealTrans.Transition = 23; //滤镜效果,随机选择更换; fc.src = "http://2010.hnzqw.com/UploadFile/2010-12/" + pic[k]; //下一个显示的图片; fc.filters.revealTrans.play(2); //显示滤镜效果,更换图片,耗时2秒; k++ //计数变量加1; if (k == pic.length) //判断图片如果都用完了; k = 0; //图片又从第一张开始显示; setTimeout("slide()", 5000) //更换图片的时间相隔5秒; } setTimeout("slide()", 3000); //第一次等待3秒开始更换图片; </script> <!--********************************************************************************--> </body> </html> |
<iframe style="LEFT: -206px; WIDTH: 1000px;
POSITION: relative; TOP: 0px; HEIGHT: 500px"
marginWidth=0 marginHeight=0 src="http://webftp.bbs.hnol.net/dysr/201101/clock_html_110204/110217.htm"
frameBorder=0><iframe>
|