0

我们的网站在 Firefox、Chrome 和 IE10 中显示良好,但在 IE9 中产品名称消失,在 IE8 中页面根本不显示。这正在影响我们的访客

一个页面示例是http://www.nutricentre.com/p-16973-anti-stretch-mark-cream.aspx

任何想法是什么原因造成的?我已经尝试了一切,目前已经添加

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

在标题标签中

4

1 回答 1

0

在 IE 中调试您的网站时,您的问题是在您使用contentwindowiframe 对象属性的 Js 文件中!

(例如,在你使用过的 core081.js 中atf.contentWindow.postMessage(s,"*"))。

正如这篇文章所暗示的,IE8 不直接支持 contentwindow。这应该是您在使用 IE8 时面临的问题。

要解决您可以尝试这种方式,例如:

var doc;
var iframeObject = document.getElementById('iframeID'); 
if (iframeObject.contentDocument) { // DOM
  doc = iframeObject.contentDocument;
} 
else if (iframeObject.contentWindow) { // IE win
  doc = iframeObject.contentWindow.document;
}

doc直接在iframeObject.contentWindow.

于 2013-06-21T13:15:13.037 回答