我有一个页面将被包含在一个iframe中,这个iframe将会被用在另一个页面中,那个页面使用以下代码:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
我希望能够在用户使用的浏览器中以最新的标准模式呈现我的页面。这是否可能?
我已经尝试包含
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
在我的页面上,我需要更改我的Web应用程序以包含值为“IE=edge”的“X-UA-Compatible”HTTP标头,但似乎无法实现我想要的效果。
奇怪的是,例如,如果我有两个页面,第一个包含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>
并且
<!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>
输出结果比较出人意料。
Page document mode: 7
Iframe document mode: 8
文档模式8从哪里来?我如何将iframe文档转换为9或更高版本?
如果有人能指点我正确的方向,我将永远感激不尽!谢谢,Nick