请大家看一下这是什么问题?
我纯粹不懂javascript,但要用这个东西,请大家帮下忙。问题是这样的:下面这段代码在ie6、ie7、opera、火狐中都能打开,但在ie8中无法打开。
<!--#include file="../dbcon.asp" -->
<%
dim iimgUrl(5)
dim iimgLink(5)
sql1="select prog_id,photoname from proginfo where recommend=5 order by
prog_id desc"
set rs=server.createobject("ADODB.Recordset")
rs.Open sql1,con,1,3
i=1
do while not rs.EOF
if i>5 then
exit do
end if
iimgUrl(i)="../../"&rs("photoname")
iimgLink(i)="movie.asp?id="&rs("prog_id")
i=i+1
rs.MoveNext
loop
rs.Close
%>
<script language="JavaScript" type="text/JavaScript">
var imgPre=new Array();
var imgUrl=new Array();
var imgLink=new Array();
imgUrl[1]="../pic/1.jpg";
imgLink[1]="movie.asp?id=13226";
imgUrl[2]="../pic/2.jpg";
imgLink[2]="movie.asp?id=13192";
imgUrl[3]="../pic/3.jpg";
imgLink[3]="movie.asp?id=12829";
imgUrl[4]="../pic/4.jpg";
imgLink[4]="movie.asp?id=12867";
imgUrl[5]="../pic/5.jpg";
imgLink[5]="movie.asp?id=12806";
var adNum=0;
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()", 5000);
}
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=465 height=300
border=0 name=imgInit></a></div></td>