一个js图片切换效果,IE6可以IE7不可以
<scriptlanguage="JavaScript"type="text/JavaScript">varimgUrl=newArray();varimgLink=ne...
<script language="JavaScript" type="text/JavaScript">
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="../oo/pic/4da.jpg";
imgLink[1]="movie.asp?id=8448";
imgUrl[2]="../oo/pic/sbm.jpg";
imgLink[2]="movie.asp?id=8713";
imgUrl[3]="../oo/pic/ssz.jpg";
imgLink[3]="movie.asp?id=7909";
var imgPre=new Array();
imgUrl[4]="../oo/pic/新射雕英雄传.jpg";
imgLink[4]="movie.asp?id=7519";
imgUrl[5]="../oo/pic/1.jpg";
imgLink[5]="movie.asp?id=6471";
var imgj=0;
for (imgi=1;imgi<=5;imgi++) {
if( (imgUrl[imgi]!="") && (imgLink[imgi]!="") ) {
imgj++;
} else {
break;
}
}
function playTran(){
if (document.all)
imgInit.filters.revealTrans.play();
}
var key=0;
function nextAd(){
if(adNum<imgj)adNum++ ;
else adNum=1;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=23;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
theTimer=setTimeout("nextAd()", 8000);
}
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=3,transition=20);"
src="javascript:nextAd()" width=482 height=353 border=0 name=imgInit></a></div></td> 展开
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="../oo/pic/4da.jpg";
imgLink[1]="movie.asp?id=8448";
imgUrl[2]="../oo/pic/sbm.jpg";
imgLink[2]="movie.asp?id=8713";
imgUrl[3]="../oo/pic/ssz.jpg";
imgLink[3]="movie.asp?id=7909";
var imgPre=new Array();
imgUrl[4]="../oo/pic/新射雕英雄传.jpg";
imgLink[4]="movie.asp?id=7519";
imgUrl[5]="../oo/pic/1.jpg";
imgLink[5]="movie.asp?id=6471";
var imgj=0;
for (imgi=1;imgi<=5;imgi++) {
if( (imgUrl[imgi]!="") && (imgLink[imgi]!="") ) {
imgj++;
} else {
break;
}
}
function playTran(){
if (document.all)
imgInit.filters.revealTrans.play();
}
var key=0;
function nextAd(){
if(adNum<imgj)adNum++ ;
else adNum=1;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=23;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
theTimer=setTimeout("nextAd()", 8000);
}
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=3,transition=20);"
src="javascript:nextAd()" width=482 height=353 border=0 name=imgInit></a></div></td> 展开
2008-12-09
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询