Solution: "The Internet cannot open the Internet site has been terminated"

Source: Internet
Author: User


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>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.