版主,您能帮忙看下这个代码吗?这个是不是实现那种效果的代码啊?不过,执行时图片显示不出来,能给看看原因吗?
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="211">
<tr> <td height="214">
<div align="center">
<script language=JavaScript>
<!--
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgLink[1]="#";
imgLink[2]="#";
imgLink[3]="#";
imgLink[4]="#";
imgUrl[1]="images/p1.jpg";
imgUrl[2]="images/p2.jpg";
imgUrl[3]="images/p3.jpg";
imgUrl[4]="images/p4.jpg";
var imgPre=new Array();
var j=0;
for (i=0;i<=3;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=10;
imgInit.filters.revealTrans.apply();
playTran();
}
document.images.imgInit.src=imgUrl[adNum];
jumpUrl=imgLink[adNum];
theTimer=setTimeout("nextAd()", 8000);
}
function goUrl(){
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '') window.open(jumpUrl,jumpTarget);
else location.href=jumpUrl;
}
}
//-->
</script>
<a href="javascript:goUrl()"><img border=0 height=300 name=imgInit
src="javascript:nextAd()" style="FILTER: revealTrans(duration=4,transition=6)" width=959></a>
</div>
</td>
</tr>
</table>
[
本帖最后由 suoyuan888 于 2009-8-27 17:05 编辑 ]