javascript - 如何在 IE 11 中以兼容模式强制执行 iframe

标签 javascript html internet-explorer-11 ie-compatibility-mode

我已经通过代码将IE11浏览器设置为兼容模式。它工作正常,但当页面具有 iframe 时,iframe 内的内容仅以标准模式出现。当主页在同一页面上打开时,有什么方法可以强制 iframe 处于兼容模式吗?

最佳答案

尝试将其添加为元头部部分的第一行..

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

<meta http-equiv="X-UA-Compatibility" content="IE=5" />;

关于javascript - 如何在 IE 11 中以兼容模式强制执行 iframe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41176054/

相关文章:

javascript - IE11 中的 JS ForEach 循环

javascript - Meteor + overflow-y : scroll makes window. scrollTo 不起作用

html - 如何使此布局在 Chrome 和 IE 11 中看起来相同?

css - 如果 "font download"属性被禁用,为什么 Base64 嵌入式字体不能在 IE11 中工作?

javascript - 他们是为网页的特定部分添加单独的 CSS 和 JS 文件的方法吗

python - 如何从 Flask 后端的 HTML 页面接收数组

javascript - 显示某些页面时强制向左(导航)框架

javascript - throttle 和去抖功能

Javascript 值似乎是串联的,而不是加在一起

javascript - 修改dom节点属性,并保存这段HTML