In fact, while opening the subform, we can also assign values to the elements of the subform, because the window.open function will also return a reference to the subform, so FatherPage.htm can be modified to: XML-Code:
< script type="text/javascript"> var child function OpenChildWindow() { if(!child) child = window.open('ChildPage.htm'); child.document.getElementById('txtInput').value =document.getElementById('txtInput').value; }
That alone is not enough , when closing the child form, the child variable of the parent form must also be cleared, otherwise the child form cannot be reopened after it is opened and then closed: XML-Code:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn