Home > Web Front-end > JS Tutorial > Internet Explorer cannot open the Internet site error occurs under IE6_javascript skills

Internet Explorer cannot open the Internet site error occurs under IE6_javascript skills

WBOY
Release: 2016-05-16 18:24:43
Original
1170 people have browsed it

The specific situation is as follows:
Before the page is fully loaded, a mouse click triggers a script event that generates an iFrame.
First of all, I thought of dynamically adding the script event to the triggering position after the page is fully loaded. In this way, there will be no script event here before the page is fully loaded, and naturally no error will be reported.
The above method is a bit passive, so I went to see the script for generating iframe.
The normal page structure is

Copy code The code is as follows:



.....



The script to generate iframe is:
Copy code The code is as follows:

function CreateiFrame(){
 var objBody = document. getElementsByTagName("body").item(0);
var objiFrame = document.createElement("iframe");
objBody.appendChild(objiFrame);
}

The appendChild() method adds a new child node to the end of the node's child node list. So the DOM after creating the iframe is:
Copy code The code is as follows:



.....



.....


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template