图片之间的切换


<script language=JavaScript>
<!--
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
var jumpUrl="http://sports.tom.com/";
imgLink[1]="http://sports.tom.com/gnzt/2005yg/";
imgLink[2]="http://sports.tom.com/zhty/";
imgUrl[1]="http://img.sports.tom.com/img/assets/200509/050927071818sportsgnzt200592701.jpg";
imgUrl[2]="http://img.sports.tom.com/img/assets/200509/050927075953zt20050926107.jpg";
var imgPre=new Array();
var j=0;
for (i=1;i<=imgUrl.length-1;i++) {
    if(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];
    jumpUrl=imgLink[adNum];
    theTimer=setTimeout("nextAd()", 7000);
}
function goUrl(){    
    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=6);border:1 solid black" src="javascript:nextAd()" width=300
border=0 name=imgInit height="210"></a>
</body>
</html>

文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 508
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭