< script language ="javascript" type ="text/javascript" > <!-- var bannerAD = new Array(); var bannerADlink = new Array(); var adNum = 0; bannerAD[0] = "01.jpg"; bannerADlink[0] = "http://www.baidu.com"; bannerAD[1] = "02.jpg"; bannerADlink[1] = "http://www.qq.com"; bannerAD[1] = "03.jpg"; bannerADlink[1] = "http://www.google.com"; var preloadedimages = new Array(); for (i=0;i<bannerAD.length;i++) { preloadedimages[i] = new Image(); preloadedimages[i].src = bannerAD[i]; } 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()", 6000); } function jump2url() { jumpUrl = bannerADlink[adNum]; jumpTarget = '_blank'; if (jumpUrl != '') { if (jumpTarget != '') window.open(jumpUrl, jumpTarget); else location.href = jumpUrl; } } function displayStatusMsg() { status = bannerADlink[adNum]; document.returnValue = true; } //--> </ script > < a onMouseOver ="displayStatusMsg();return document.returnValue" href ="javascript:jump2url()" >< img src ="javascript:nextAd()" name ="bannerADrotator" border ="0" id ="bannerADrotator" style ="FILTER: revealTrans(duration=2,transition=20)" /></ a > 转载于:https://www.cnblogs.com/tjsquall/archive/2007/12/21/1008299.html