我有一个页面将包含在页面上的iframe中,他们使用以下内容:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
Run Code Online (Sandbox Code Playgroud)
理想情况下,我想使用用户正在使用的浏览器可用的最新标准模式来呈现我的页面.这可能吗?
我试过包括
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
Run Code Online (Sandbox Code Playgroud)
在我的页面上,以及改变我的webapp以包含'X-UA-Compatible'HTTP标头,其值为'IE = edge',但我似乎无法让它做我想要的.
奇怪的是,如果我有两个页面,第一个包含iframe,另一个是iframe中显示的内容,如下所示:
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<script>
console.log("Page document mode: "+document.documentMode);
</script>
</head>
<body>
<iframe src="iframepage.html" />
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
和
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script>
console.log("Iframe document mode: "+document.documentMode);
</script>
</head>
<body>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
输出是相当意外的
Page document mode: 7
Iframe document mode: 8
Run Code Online (Sandbox Code Playgroud)
文档模式8来自何处?如何将iframe文档制作成9或以上?
如果有人能指出我正确的方向,我将永远感激不尽!谢谢,尼克