IE8 兼容视图 IE7 解决办法
昨天程序在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 />
<add name="X-UA-Compatible" value="IE=EmulateIE7"></add>
</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
作者:ChenHuzi