添加和LT; META HTTP-当量=" X-UA兼容"内容= QUOT; IE = 9" />使用JavaScript [英] Adding <meta http-equiv="X-UA-Compatible" content="IE=9" /> using javascript

查看:108
本文介绍了添加和LT; META HTTP-当量=" X-UA兼容"内容= QUOT; IE = 9" />使用JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在那是在IE 8,9,Chrome浏览器,Firefox和Safari工作正常,但上破10 IE版本进入了光,只有当部分用户切换到IE 10.

最简单的办法,我发现添加

 < META HTTP-EQUIV =X-UA-Compatible的内容=IE = 9/>

< HEAD>< /头方式>

问题是网站有很多页面和大多数页面不继承母版页。
那么,有没有办法通过JavaScript来添加这一点,因为我们在所有网页的共同引用的JS。


解决方案

谢谢大家的回应和帮助。
我一直在寻找像在web.config中添加以下code:

 < httpProtocol>
            < customHeaders>
                <清/>
                <! - 该设置会使文档模式,我们需要有模式8及更高版本最高的模式 - >
                <添加名称=X-UA-Compatible的值=IE = IE9/>
            < / customHeaders>
        < / httpProtocol>

< system.webServer方式> 部分

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆