- 论坛徽章:
- 0
|
javascript窗口间交换数据
原帖由 "erwolf" 发表:
最近遇到一个问题就是头让我写一个,在线编辑器。当然了,功能不是很强大的那种。只要支持,文本与图形混排就行了。
可我只对javascript有一些简单的了解。对javascript中的浏览器对象不很熟悉。
现在最主要的..........
参考(Firefox、IE6测试通过)
parent.html
- <html>;
- <body>;
- <FORM NAME="myform">;
- <input type="text" name="name" value="initial value">;
- <INPUT TYPE="button" NAME="Button1" VALUE="Open Child Window!"
- onClick="window.open ('child.html', 'newWin',
- 'scrollbars=yes,status=yes,width=300,height=300')">;
- </FORM>;
- </body>;
- </html>;
复制代码
child.html
- <html>;
- <body onUnload="window.opener.document.bgColor='bisque';window.opener.document.myform.name.value='changed by child window';">;
- child.html
- </body>;
- </html>;
复制代码 |
|