日期:2014-05-16 浏览次数:20405 次
<table width="535" height="215" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="450" height="215"> <script language="JavaScript"> //js代码 var bannerAD = new Array(); //用于存放图片路径(相对路径) var adNum = 0; bannerAD[0] = "image/home1.jpg"; bannerAD[1] = "image/home2.jpg"; bannerAD[2] = "image/home3.jpg"; function setTransition() { if (document.all) { bannerADrotator.filters.revealTrans.Transition = Math.floor(Math.random()*23);//设置图片切换 bannerADrotator.filters.revealTrans.apply(); //应用图片切换 } } function playTransition(){ if (document.all) bannerADrotator.filters.revealTrans.play() //播放图片 } function nextAd(){ if (adNum < bannerAD.length - 1) adNum++; else adNum = 0; setTransition(); document.images.bannerADrotator.src = bannerAD[adNum]; playTransition(); theTimer = setTimeout("nextAd()", 5000); //5秒钟切换一张图片 } </script> <img style="FILTER: revealTrans(duration=2,transition=20)" height=292 src="" width=515 border=1 name=bannerADrotator> <SCRIPT language="JavaScript">nextAd()</SCRIPT> </td> </tr> </table>