Title: JavaScript / JScript Implementing the Mutual Reference Problem of Parent-Son Forms (Powered By ZosataPo)
Key Words: JavaScript JScript Form Reference Content: Recently, there are many netizens asking questions about how to use JavaScipT implementation pop-up form and parent form function. I have some experience in the previous use, I hope to share with you. I hope to have some help to the needs of users.
This paper mainly is mainly based on example, and all source code is attached thereafter. The key to the parent form, the child form reference is below: (1) Window.Open. Function return value is a reference handle that pops up the subform. (2) Get the parent window. 4/10 with the handle. This is the key to functional implementation, and it is very simple. Self.opener Returns the parent form of the form. (3) Form references implemented by Self, Window, Parent, TOP, are implemented for frame / frameset, which is not large. If you don't get the parent form that pops up the form with Parent.
This article is only a simple analysis description for the reference between the form. Source code is just to provide simple demonstration, very imperfect, if used, please increase the corresponding error checks.
Function openwindow () {if (child == null) {child = window.open ("child.htm");}}
Function CallMethod () {if (child! = null) {child.testc ();}}
Function closewindow () {if (child! = null) {child.close (); child = null;}} // -> script>