动态图js脚本

动态图js脚本
        <!-- 动态图开始 -->

<script language=JavaScript>

 

var imgUrl=new Array();

var imgLink=new Array();

var adNum=0;

imgUrl[1]="images/default/toplist/1.jpg";

imgLink[1]="/z/chn-iran/photo/3712/index.shtml";

imgUrl[2]="images/default/toplist/2.jpg";

imgLink[2]="/z/chn-iran/photo/3712/index.shtml";

imgUrl[3]="images/default/toplist/3.jpg";

imgLink[3]="/z/chn-iran/photo/3672/";

imgUrl[4]="images/default/toplist/4.jpg";

imgLink[4]="/z/chn-iran/photo/3672/";

imgUrl[5]="images/default/toplist/5.jpg";

imgLink[5]="/z/chn-iran/photo/3672/";

 

 

var imgPre=new Array();

var j=0;

for (i=1;i<=5;i++) {

       if( (imgUrl[i]!="") && (imgLink[i]!="") ) {

              j++;

       } else {

              break;

       }

}

 

function playTran(){

       if (document.all)

              imgInit.filters.revealTrans.play();

}

 

var key=0;

function nextAd(){

       if(adNum<j)adNum++ ;

       else adNum=1;

     

       if( key==0 ){

              key=1;

       } else if (document.all){

              imgInit.filters.revealTrans.Transition=6;

              imgInit.filters.revealTrans.apply();

                 playTran();

 

       }

       document.images.imgInit.src=imgUrl[adNum];

       theTimer=setTimeout("nextAd()", 6000);

}

 

 

function goUrl(){

       jumpUrl=imgLink[adNum];

       jumpTarget='_blank';

       if (jumpUrl != ''){

              if (jumpTarget != '')

                     window.open(jumpUrl,jumpTarget);

              else

                     location.href=jumpUrl;

       }

}

</script>

<a href="javascript:goUrl()"><img style="FILTER: revealTrans(duration=2,transition=20);border-color:black;color:#000000" src="javascript:nextAd()" width=258 height=230 border=1 class=b1 name=imgInit></a>

<!-- 动态图结束 -->


posted on 2007-07-05 11:53 chenguo 阅读(382) 评论(0)  编辑  收藏 所属分类: AJAX Dev


只有注册用户登录后才能发表评论。


网站导航:
 
<2024年12月>
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

导航

统计

留言簿

随笔分类(1)

文章分类(52)

好友 小山的博客

最新随笔

最新评论