[年少莽撞]

思考着程序,思考着人生。在这里记载着我的成长,沉淀着我的思想。

新浪体育图片新闻动态效果代码

<!-- 动态图开始 -->
<script language=JavaScript>

var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F3981DT20040803214045.jpg";
imgLink[1]="/n/2004-08-03/23461042447.shtml";
imgUrl[2]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4252DT20040803214045.jpg";
imgLink[2]="/z/asiancup2004/photo/3715/";
imgUrl[3]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4254DT20040803214359.jpg";
imgLink[3]="/z/asiancup2004/photo/3715/";
imgUrl[4]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4256DT20040803213414.jpg";
imgLink[4]="/z/asiancup2004/photo/3715/";
imgUrl[5]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4258DT20040803211301.jpg";
imgLink[5]="/z/asiancup2004/photo/3715/";


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>
<!-- 动态图结束 -->

 



var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F3981DT20040803214045.jpg";
imgLink[1]="/n/2004-08-03/23461042447.shtml";
imgUrl[2]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4252DT20040803214045.jpg";
imgLink[2]="/z/asiancup2004/photo/3715/";
imgUrl[3]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4254DT20040803214359.jpg";
imgLink[3]="/z/asiancup2004/photo/3715/";
imgUrl[4]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4256DT20040803213414.jpg";
imgLink[4]="/z/asiancup2004/photo/3715/";
imgUrl[5]="http://image2.sina.com.cn/ty/asian2004/U350P6T189D1F4258DT20040803211301.jpg";
imgLink[5]="/z/asiancup2004/photo/3715/";


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?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;
?}
}


阅读更多
个人分类: Jsp
想对作者说点什么? 我来说一句

新浪新闻获取代码

2018年03月21日 4KB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭