01.
02.
<script type=
"text/javascript"
>
03.
window.onload =
function
() {
04.
var
frame = document.getElementById(
"frame1"
);
05.
var
msg = frame.contentDocument.getElementById(
"message"
);
06.
msg.innerHTML =
"Hello World from Frame Page 1"
;
07.
};
08.
</script>
09.
</pre>
10.
<pre class=
"brush:javascript;gutter:false;toolbar:false"
>
11.
12.
<div class=
"errordisplay"
id=
"message"
>
13.
original
14.
</div>
15.
16.
<script type=
"text/javascript"
>
17.
var
msg = window.parent.document.getElementById(
"message"
);
18.
msg.innerHTML =
"Updated from iFrame"
;
19.
</script>