IE 8 HTML Parsing Error:Unable to modify the parent container element before the child element is closed
IE8报下面错误,而且是我的机器不报,同事的机器报,试了4台,两个报,两个不报,IE版本都一样,没想明白
解决:
2、是否在页面未加载完前js代码操作了body里的元素,将相关js代码移到</body>后面
网页错误详细信息
用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
时间戳: Wed, 14 Apr 2010 08:33:56 UTC
消息: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
行: 0
字符: 0
代码: 0
URI:
http://support.microsoft.com/kb/927917
<head>
</head>
<body>
<div>
<script type="text/javascript">
alert(document.readyState);
var oDiv = document.createElement("DIV");
oDiv.innerHTML = 'test odiv test odiv';
document.body.appendChild(oDiv);
</script>
</div>
</body>
</html>
2.或者
js中加入了 setTimeout("XXXX()",1000);,使其获得足够的加载时间后执行目标(XXXX)的function,于是问题得到解决