InternetExplorercannotopentheInternetsite error in IE6 _ javascript skills

Source: Internet
Author: User
The "InternetExplorercannotopentheInternetsite" error frequently occurs in ie6. The specific situation is as follows:
When the page is not fully loaded, a script event that generates iFrame is triggered by clicking the mouse.
First, we thought about adding a script event to the trigger position after the page is fully loaded. In this way, no script event exists here before the page is fully loaded, naturally, no error is reported.
The above method is somewhat passive, so see the script for generating iframe.
The normal page structure is

The Code is as follows:






The script for generating iframe is:

The Code is as follows:


Function CreateiFrame (){
Var objBody = document. getElementsByTagName ("body"). item (0 );
Var objiFrame = document. createElement ("iframe ");
ObjBody. appendChild (objiFrame );
}


AppendChild () method to add a new subnode at the end of the node's subnode list. Therefore, the DOM after the iframe is created is:

The Code is as follows:







Because it is in

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.