93、变换的导航图片

93、变换的导航图片

脚本说明:

把如下代码加入<head>区域中

<script language=JavaScript>

<!-- // BannerAD

 

var bannerAD=new Array();

var bannerADlink=new Array();

var adNum=0;

 

bannerAD[0]="search_banner.gif";

bannerADlink[0]="http://www.china.net/";

bannerAD[1]="search_banner.gif";

bannerADlink[1]="http://www.7stk.com";

bannerAD[2]="hzbanner.gif";

bannerADlink[2]="http://www.7stk.com";

bannerAD[3]="search_banner.gif";

bannerADlink[3]="http://www.7stk.com";

bannerAD[4]="468.gif";

bannerADlink[4]="http://www.7stk.com/";

bannerAD[5]="email-banner";

bannerADlink[5]="http://www.7stk.com";

 

var preloadedimages=new Array();

for (i=1;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()", 5000);

}

 

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

style="FILTER: revealTrans(duration=2,transition=20)" height=60

src="search_banner.gif" width=468 border=1

name=bannerADrotator>

</A>

<SCRIPT language=JavaScript>nextAd()</SCRIPT>

 

 

Write a comment

Comments: 0