都过中秋去了改了一下: 
<img id="ProImg" border=0 src="http://i3.sinaimg.cn/home/deco/2008/0325/sinahome_Logo.gif" onload="javascript:if(this.offsetWidth > 20)this.style.width='20px';">通过了 IE6 和 FF 

解决方案 »

  1.   

    好像可以啊
    最好给个测试页
    或者试试
    setTimeout(function(){
    if (theImg.width>18){ 
    theImg.width=18; 
      }   if(theImg.height>20){ 
        theImg.height=20; 
      } },10)
      

  2.   

    以下是出问题的页面,经过测试,我找到了影响这个结果的代码,但是我却无法获知是为什么?
    <table width="878" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="2"></td>
    <td  width="180" height="179" valign="top" class="TableBorder">
    <table width="100%" align="center"  border="0" cellspacing="1" cellpadding="0">
    <tr><td height="34"  class="indexTitleRight">产品列表</td></tr>
    <tr><td height="10">
    <div align="right"><% =WebMenu("ProductSort",0)%></div>
    </td></tr>
    </table>
    </td>
    <td width="10"></td>
    <td  valign="top"  align="center">
    <div>
                    <table width="490" border="0" cellspacing="0" cellpadding="0">
    <TR><TD height="1" colspan="3">
    <!--广告位-->
    <div class="adDiv"><script src="getAd.asp?Type=详细&Type1=产品&AdW=490&AdH=80&Ads=1"></script></div>
    </td></tr>
    </table>
    <!--产品内容-->
    <table width="490" border="0" class="TableTriBorder" align="center" cellpadding="5" cellspacing="0" >
    <TR>
    <TD class=BgRigBotBorder vAlign=center align=middle width=170 rowSpan=9>
    <div><img src="<%=rs("DefaultPicUrl")%>" onload="Javascript:javascript:if(this.width>10)this.width=10;"></div> </TD>
    <td width="60" align="right" class="BgRigBotBorder">产品编号</td>
    <td class="botBorder"><%=rs("Product_Id")%>&nbsp;</td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">产品名称</td>
    <td class="botBorder"><%=rs("title")%>&nbsp;</td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">所属类别</td>
    <td class="botBorder"><%=rs("ClassName")%>&nbsp;</td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">产品售价</td>
    <td class="botBorder">
    <%response.write "直销价格:<font color=#0000ff>¥" & rs("NormalPrice") &"</font>&nbsp;元<br>"%>
    </td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">发布日期</td>
    <td class="botBorder"><%=rs("AddTime")%>&nbsp;</td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">产品规格</td>
    <td class="botBorder"><%=rs("Spec")%>&nbsp;</td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">购买次数</td>
    <td class="botBorder"><%=rs("BuyHits")%>&nbsp;次</td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">点击次数</td>
    <td class="botBorder"><%=rs("Hits")%>&nbsp;次</td>
    </tr>
    <tr>
    <td width="60" align="right" class="BgRigBotBorder">马上购买</td>
    <td class="botBorder"><a href="add.asp?product_Id=<%=rs("ID")%>&ProductNum=1" target="_blank"><img src="images/cart.gif"></a></td>
    </tr>
    </table>
    <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
    <tr><td height="5"></td></tr>
    <tr><td class="indexTitleRight">产品详细参数</td></tr>
    <tr><td class="NewsContent"><%=rs("content")%></td></tr>
    </table>
    </td>
    <td width="10"></td>
    <td width="200" valign="top">
    <!-----此处为影响结果正确的部分------>
    <table width="98%" align="right" border="0" cellspacing="1" cellpadding="0">
    <tr><td class="indexDiv180">产品购买排行</td></tr>
    <tr><td style="height:183px;"><script src="getProduct_top.asp?SA=YES&stime=yes&TLen=12&Num=10"></script></td></tr>
    <tr><td style="padding-top:10px;text-align:center;"><script src="getAd.asp?Type=详细&Type1=产品&AdW=170&AdH=150&Ads=2"></script></td></tr>
    </table><!-----但是文件上部分也有类似的调用,但是不影响结果,而且经过检查认为此部分的代码也没什么问题------>
    </td>
    </tr>
    </table>
      

  3.   

    因为你的图片load需要一段时间<img id="ProImg" border=0 src="UploadFiles/2008911175547745.jpg" onload="javascript:zoomIt(this);"> <script language="Javascript"> 
    function zoomIt(theImg) { 
      setTimeout('a=changeSrc(theImg)',200);} function zoomIt(theImg) {
      if (theImg.width>18) { 
          theImg.width=18; 
      }   if(theImg.height>20) { 
        theImg.height=20; 
      } 
    }
    </script>
      

  4.   

    楼上的答案是不对的。你这情况挺复杂。是用script异步载入的……。有时候我在页面添加google广告,也遇到有的可以,有的不可以的情况。
      

  5.   

    这个问题一直都没有解决,但是不管如何,还是谢谢各位热心了.
    ps:最近一直在看asp.net所以没有上来,拖了很久了,真是抱歉.