[HTML]

Plain text view
Copy the code

?
01
02
03
04
05
06
07
08
09
10
11
<
html
>
<
head
></
head
>
<
body
><
div
id
=
"msg"
> Status: </
div
></
body
>

<
script
>
var msg = document.getElementById("msg");
var iframe = document.createElement("iframe");
iframe.onload = function(){ msg.innerHTML += "onload,"; }
document.body.appendChild(iframe);
iframe.src = "http://www.baidu.com" ;
</
script
>
</
html
>











[HTML]

Plain text view
Copy the code

?
01
02
03
04
05
06
07
08
09
10
11
<
html
>
<
head
></
head
>

<
body
><
div
id
=
"msg"
> Status: </
div
></
body
>

<
script
>

var msg = document.getElementById("msg");

var iframe = document.createElement("iframe");

iframe.onload = function(){ msg.innerHTML += "onload,"; }

iframe.src = "http://www.baidu.com" ;

document.body.appendChild(iframe);

</
script
>
</
html
>  

For more technical information: Gzitcast