Javascript教程_解决JS幻灯效果在FF下面正常工作源码教程
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="" rel="stylesheet" type="text/css" />
<script language=JavaScript>
var imgUrl=new Array();
var imgLink=new Array();
var imgtext=new Array();
var adNum=0;
imgUrl[1]="";
imgtext[1]="韩国224儿童插画欣赏";
imgLink[1]="";
imgUrl[2]="";
imgtext[2]="Cengiz Bodur时尚插画作品欣赏";
imgLink[2]="";
imgUrl[3]="";
imgtext[3]="韩国junillust猫人插画欣赏(二)";
imgLink[3]="";
imgUrl[4]="";
imgtext[4]="韩国KIKI插画作品之人物精选";
imgLink[4]="";
var imgPre=new Array();
var count=0;
for (i=1;i<=4;i++) {
if( (imgUrl[i]!="") && (imgLink[i]!="") ) {
count++;
} else {
break;
}
}
function playTran(){
if (document.all)
imgInit.filters.revealTrans.play();
}
var key=0;
function nextAd(){
if(adNum<count)adNum++ ;
else adNum=1;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=10;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
focustext.innerHTML="<a href="+imgLink[adNum]+" target=_blank>"+imgtext[adNum]+"</a>";
setTimeout("nextAd()", 3000); //控制时间
}
function nextAd2(){
if(adNum<count)adNum++ ;
else adNum=1;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=10;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
focustext.innerHTML="<a href="+imgLink[adNum]+" target=_blank>"+imgtext[adNum]+"</a>";
}
function prondAd(){
if(adNum>1)adNum-- ;
else adNum=4;
if( key==0 ){
key=1;
} else if (document.all){
imgInit.filters.revealTrans.Transition=10;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
focustext.innerHTML="<a href="+imgLink[adNum]+" target=_blank>"+imgtext[adNum]+"</a>";
}
function goUrl(){
window.open(imgLink[adNum],'_blank');
}
</script>
</head>
<body>
<DIV align="center" ><br /><br />
<div class="table">
<div class="table_1_1">
<div class="table_1_1_pic">
<a href="javascript:goUrl()"><img style="FILTER: revealTrans(duration=1,transition=5);border-color:black;color:#000000" src="javascript:nextAd()" width="430" height="210" border="0" name="imgInit"></a>
</div>
<div class="table_1_1_pic"><div class="table_1_1_title"><img src=""> <span id="focustext"></span></div><div class="table_1_1_page"><img src="" alt="上一条" width="6" height="17" align="absbottom" /> <a href="javascript:prondAd()">PREV</a> | <a href="javascript:nextAd2()">NEXT</a> <img src="" alt="下一篇" width="6" height="17" align="absbottom" /></div></div>
</div>
</div>
</body>
</html>
这个JS幻灯效果在IE下面正常
但FF下面是死的
如何在FF下面正常工作?
最好的解决方法就是排除法 编程时门耐心技术