本帖最后由 zmaxlyxh 于 2009-09-04 08:01:23 编辑

解决方案 »

  1.   

    看不出什么问题..... 看着document.all不顺眼
      

  2.   

    同意楼上咱对elady1_listMsg() 这个函数也不很喜欢
      

  3.   

    我在本机测试了一下,IE6,IE7都可以看到图片,你自己也可以下一个IETester试一下
      

  4.   


    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>JS图片过渡效果</title>
    </head><body>
    <table width="300" height="300" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f4f4f4">
      <tr>
        <td><script language=JavaScript>
    var elady_step=3;    //1:small, 3:middle, 5:big
    var elady_speed=50;    //20:fast, 50:middle, 80:slow
    var e_tp=new Array();
    var e_tplink=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<4)    elady_star_sh++;
    else    elady_star_sh=1;
    setTimeout("elady1_moveImg()",elady_speed);}e_tplink[0]="http://www.lanrentuku.com/";
    e_tp[0]="images/01.jpg";e_tplink[1]="http://www.lanrentuku.com/";
    e_tp[1]="images/02.jpg";e_tplink[2]="http://www.lanrentuku.com/";
    e_tp[2]="images/03.jpg";e_tplink[3]="http://www.lanrentuku.com/";
    e_tp[3]="images/04.jpg";
    var currentimage=new Array();   
    for (i=0;i<=3;i++){currentimage[i]=new Image();
          currentimage[i].src=e_tp[i];
             }
             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_linkurl(){   jumpUrl=e_tplink[adNum_elady1];
                                        jumpTarget='_blank';
                                           if (jumpUrl != ''){      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
                                                 else location.href=jumpUrl;
                                                    }}
    function elady1_listMsg() 
    {   status=e_tplink[adNum_elady1];
    document.returnValue = true;}
    document.write("<div id='elady1_divimg' style='position:relative'>");
    document.write('<a onMouseOver="elady1_listMsg();return document.returnValue" href="javascript:elady1_linkurl()" target="_self">');
    document.write('<img style="FILTER: revealTrans(duration=2,transition=20)" height=300 src="" width=300 border=0 name=e_tprotator ></a>');
    document.write("</div>");
    window.onload=function(){
    elady1_nextAd();
    }
        </script></td>
      </tr>
    </table>
    </body>
    </html>
      

  5.   

    window.onload=function(){
    document.images.e_tprotator.src=e_tp[0];
    elady1_nextAd();
    }
      

  6.   

    hookee,可以解答一下原因吗?
    为什么我测试的时候 是好的
      

  7.   

    还有楼上的朋友,我刚下ietester0.35版本,用IE7可以,IE6不行,提示:类不能支持automation错误,错误行56。但是实际上我电脑IE6 IE7都有,事实刚好相反,IE7不行,IE6能运行,郁闷死了。
      

  8.   

    hookee,谢谢了,能帮我解释下为什么我的代码在IE6下能运行,IE7下就不能呢?请指教下。
      

  9.   

    主要是 不支持src="javascript:"这种用法,可能是安全问题.
      

  10.   

    在属性值后面加一个:!important可以屏蔽掉IE6
      

  11.   

    在属性值后面加一个:!important可以屏蔽掉IE6