| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 877 人关注过本帖
标题:相同的js程序,在IE6下没问题,IE7下无法执行?
只看楼主 加入收藏
popcolor
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-11-6
收藏
 问题点数:0 回复次数:1 
相同的js程序,在IE6下没问题,IE7下无法执行?

从网上下了一段图片变换的js程序,在IE6下可以正常显示,在IE7下则不行,请高手指点
html的body部分加入:
<script language="javascript" type="text/javascript" src="js/showimage.js"></script>
js文件如下:
var elady_step=1;
var elady_speed=80;
var e_tp=new Array();
var adNum_elady1=0;
var elady_stop_sh=0;
var elady_star_sh=1;

function elady1_moveImg(){
if ((!document.all&&!document.getElementById)||(elady_stop_sh==0)) return;
if (elady_star_sh==1){
document.all.elady1_divimg.style.pixelTop=parseInt(document.all.elady1_divimg.style.pixelTop)+elady_step;
}
else if (elady_star_sh==2){
document.all.elady1_divimg.style.pixelLeft=parseInt(document.all.elady1_divimg.style.pixelLeft)+elady_step;
}
else if (elady_star_sh==3){
document.all.elady1_divimg.style.pixelTop=parseInt(document.all.elady1_divimg.style.pixelTop)-elady_step;
}
else {
document.all.elady1_divimg.style.pixelLeft=parseInt(document.all.elady1_divimg.style.pixelLeft)-elady_step;
}

if (elady_star_sh<3) { elady_star_sh++; }
else { elady_star_sh=1; }
setTimeout("elady1_moveImg()",elady_speed);
}

e_tp[0]="images/img1.jpg";
e_tp[1]="images/img2.jpg";
e_tp[2]="images/img3.jpg";

function elady1_set()
{ if (document.all)
{ e_tprotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
e_tprotator.filters.revealTrans.apply();
}
}

function elady1_playCo()
{ if (document.all)
{ e_tprotator.filters.revealTrans.play(); }
}

function elady1_nextAd()
{ if (adNum_elady1<e_tp.length-1) { adNum_elady1++ ; }
else adNum_elady1=0;
elady1_set();
document.images.e_tprotator.src=e_tp[adNum_elady1];
elady1_playCo();
theTimer=setTimeout("elady1_nextAd()", 4000);
}

function elady1_listMsg()
{
document.returnValue = true;
}
document.write("<div id='elady1_divimg' style='position:relative'>");
document.write("<img style='FILTER: revealTrans(duration=2,transition=20)' src='javascript:elady1_nextAd()' border=0 width=840px height=500px align='center' id='e_tprotator'>");
document.write("</div>");

搜索更多相关主题的帖子: js程序 var elady document 
2007-11-06 08:37
popcolor
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-11-6
收藏
得分:0 

帖子沉得好快,大家帮帮忙!

2007-11-06 09:51
快速回复:相同的js程序,在IE6下没问题,IE7下无法执行?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011415 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved