昨天程序在IE8进行测试,结果document.getELementById().click()事件不执行。这下真麻烦了,经过问询及搜索终于找到解决办法,在这里记录一下

 

如果你的页面对IE7兼容没有问题,又不想大量修改现有代码,同时又能在IE8中正常使用,

微软声称,开发商仅需要在目前兼容IE7的网站上添加一行代码即可解决问题,此代码如下:
CODE: 在<head></head>里
<meta http-equiv="x-ua-compatible" content="ie=7" /> 

 

期间我有用 web.config来进行配置,这样就不用在每个页面里加入上面那些代码了,

但最终没能成功,我的环境是VS05,如果有会的请跟帖跟我说一下,

 

  <system.webServer>
      <httpProtocol>
        <customHeaders>
          <clear />
        </customHeaders>
    </httpProtocol>
</system.webServer>

  <system.webServer>      

<httpProtocol>        

<customHeaders>          

<clear />          

<add name="X-UA-Compatible" value="IE=EmulateIE7"></add>        

</customHeaders>    

</httpProtocol>

</system.webServer>

 

参考资料:

http://www.cnblogs.com/quluqi/archive/2009/10/23/1588682.html

相关文章:

  • 2021-06-02
  • 2021-08-29
  • 2022-12-23
  • 2021-08-30
  • 2021-06-24
  • 2021-07-22
猜你喜欢
  • 2021-11-19
  • 2021-07-23
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
  • 2021-12-20
相关资源
相似解决方案