Webpage error details
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; QQDownload 551; SLCC2; .NET CLR 2.0.50727)
Timestamp: Wed, 12 Aug 2009 07: 02:03 UTC
Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Characters: 0
Code: 0
This situation occurred while debugging a piece of JS code today. It works fine under Firefox IE7 and IE6... I was depressed. I searched for relevant information on the Internet. Generally, the error means that the specified tag has not been loaded, so the object is used. ...
Checked the code and there seems to be no problem
As follows
var bgObj = document.createElement("div");
bgObj.style.cssText = "position:absolute;left:0px;top:0px;width:" iWidth "px;height:" Math.max (document.body.clientHeight, iHeight) "px;filter:Alpha(Opacity=30);opacity:0.3;background-color:#000000;z-index:101;";
document.body.appendChild(bgObj );
In fact, after careful inspection, I found that this code will run before the body is loaded....
That’s the problem....
So the code can only be executed outside the wave voltage
var bgObj = document.createElement("div");
bgObj.style.cssText = "position:absolute;left:0px;top:0px;width:" iWidth "px;height:" Math.max (document.body.clientHeight, iHeight) "px;filter:Alpha(Opacity=30);opacity:0.3;background-color:#000000;z-index:101;";
document.body.appendChild(bgObj );
This is OK and no problem... It seems that IE's logic is getting stronger and stronger... Maybe this problem occurred in many codes in the past