You are here: irt.org | FAQ | JavaScript | Frame | Q853 [ previous next ]
Try the following which works in Internet Explorer 4+ and Netscape Navigator 6+:
<iframe width="100%" height="100" src="blank.htm"></iframe>
<script language="JavaScript"><!--
document.frames[0].document.open();
document.frames[0].document.write('Hello world');
document.frames[0].document.close();
//--></script>The following was submitted by Stefano B.
This works only on onload() method or onclick() method:
<!--Writing html//--> idContent.document.body.innerHTML="<b>test</b>"; <!--Writing text//--> idContent.document.body.innerText="<b>test</b>";