This is because:
In IE, during the document loading process, the DOM structure of the entire HTML document has not yet been completely generated, and the JavaScript code being executed has created a new Dom node, the structure of the DOM tree is disordered.
Error-prone Syntax:CopyCodeThe Code is as follows: <HTML>
<Head>
<Title> xxxxxxxxxxxx </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Meta name = "author" content = "fengyan, cnlei"/>
<Meta name = "Copyright" content = "cnlei.y.l@gmail.com, http://www.cnlei.com"/>
<Meta name = "keywords" content = ""/>
<Meta name = "Description" content = ""/>
</Head>
<Body>
Xxxxxxxxxxxxxxxxxx
<SCRIPT type = "text/JavaScript">
<! --
(Function Init (){
$ Win (). Create ({// create a complex HTML Structure
ID: "lwindow_reg ",
Title: "registering a new user ",
Type: "ajax ",
Innerhtml: 'ex_reg.html'
},{
Top: "50px ",
Left: "270px ",
Width: "560px"
});
})();
-->
</SCRIPT>
Xxxxxxxxxxxxxxxxxx
</Body>
</Html>
Solution: Copy code The Code is as follows: <HTML>
<Head>
<Title> xxxxxxxxxxxx </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Meta name = "author" content = "fengyan, cnlei"/>
<Meta name = "Copyright" content = "cnlei.y.l@gmail.com, http://www.cnlei.com"/>
<Meta name = "keywords" content = ""/>
<Meta name = "Description" content = ""/>
</Head>
<Body>
Xxxxxxxxxxxxxxxxxx
<SCRIPT type = "text/JavaScript">
<! --
(Function (){
Function Init (){
$ Win (). Create ({// create a complex HTML Structure
ID: "lwindow_reg ",
Title: "registering a new user ",
Type: "ajax ",
Innerhtml: 'ex_reg.html'
},{
Top: "50px ",
Left: "270px ",
Width: "560px"
});
};
If (! DWS. BV. isie) {// non-IE browser direct Initialization
Init ();
} Else {
// In IE, prevent the browser from prompting "Internet website e cannot open the Internet site"
If (document. readystate = "complete "){
Init ();
} Else {
Document. onreadystatechange = function (){
If (document. readystate = "complete") Init ();
}
}
}
})();
-->
</SCRIPT>
Xxxxxxxxxxxxxxxxxx
</Body>
</Html>