添加和LT; META HTTP-当量=&QUOT; X-UA兼容&QUOT;内容= QUOT; IE = 9&QUOT; /&GT;使用JavaScript [英] Adding <meta http-equiv="X-UA-Compatible" content="IE=9" /> using javascript
问题描述
我在那是在IE 8,9,Chrome浏览器,Firefox和Safari工作正常,但上破10 IE版本进入了光,只有当部分用户切换到IE 10. 最简单的办法,我发现添加
&LT; META HTTP-EQUIV =X-UA-Compatible的内容=IE = 9/&GT;
在&LT; HEAD&GT;&LT; /头方式&gt;
问题是网站有很多页面和大多数页面不继承母版页。
那么,有没有办法通过JavaScript来添加这一点,因为我们在所有网页的共同引用的JS。
谢谢大家的回应和帮助。
我一直在寻找像在web.config中添加以下code:
&LT; httpProtocol&GT;
&LT; customHeaders&GT;
&LT;清/&GT;
&LT;! - 该设置会使文档模式,我们需要有模式8及更高版本最高的模式 - &GT;
&LT;添加名称=X-UA-Compatible的值=IE = IE9/&GT;
&LT; / customHeaders&GT;
&LT; / httpProtocol&GT;
在&LT; system.webServer方式&gt;
部分
I have a strange problem with IE 10. Many jQuery scripts that are working fine on IE 8, 9, Chrome, firefox and safari but broken on IE 10. Issue came into light only when some users switch to IE 10.
Easiest solution I found to add
<meta http-equiv="X-UA-Compatible" content="IE=9" />
in <head></head>
.
The problem is site has a lot of pages and most pages don't have inherited master page. So is there any way to add this through javascript, as we have a common referenced js in all webpages.
Thanks everyone for responses and help. What I was looking for was like adding below code in web.config:
<httpProtocol>
<customHeaders>
<clear/>
<!--This setting will make document mode to highest mode available we need have mode 8 and above-->
<add name="X-UA-Compatible" value="IE=IE9"/>
</customHeaders>
</httpProtocol>
in <system.webServer>
section.
这篇关于添加和LT; META HTTP-当量=&QUOT; X-UA兼容&QUOT;内容= QUOT; IE = 9&QUOT; /&GT;使用JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!