<html>
<script>
function aaa(){
document.mxh.document.open();
document.mxh.document.write('<html><body>这是写出来的啊!!!!</body></html>');
document.mxh.document.close();
}</script><body><br>
<br>
<form>
<input type=button value="点击" onclick="aaa()">
</form>
<layer name=mxh src="qq.htm" width=100 height=100></layer>
</body>
</html>qq.htm文件如下:
<html>
<body>原来的例子</body>
</html>不过,NN6支持innerHTML属性。