【问题标题】:white page shown only in IE8/IE9仅在 IE8/IE9 中显示的白页
【发布时间】:2011-11-10 18:27:21
【问题描述】:
我有一个奇怪的问题...我正在开发一个用于搜索房屋租赁的网络应用程序,该网站在 FF、Chrome 中显示良好,但在 IE 中我得到一个白页...。
你能提示一下代码是怎么回事吗?也许一些java脚本问题?
我已经挖出来了,但我被困住了。
【问题讨论】:
标签:
javascript
internet-explorer-8
cross-browser
【解决方案1】:
问题是:
</head>
<!--[if lt IE 7]>
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
<div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>-->;
</head>
您有 2 个用于 head 的关闭标签,并且在您之间有一个很大的空 div。这就是IE上显示的内容。