This article was mainly transferred from: http://www.360doc.com/content/11/0525/17/6161903_119333834.shtml
Http://zhidao.baidu.com/question/178864421.html
The parent-child page calls each other several ways to summarize:
First: Use window.open () to open a new window
parent page called Child page:
The child page is opened with window.open and the method is called
var AA = window.open ();
Aa. Child ();//child () is a sub-page method
The child page calls the parent page:
Window.opener. The parent ()//Window.opener is actually a form that is opened by window.open.
The second type: using an embedded frame call
For example: <iframe src= "/**.jsp" width= "100%" height=100% name= "Mapframe" ></iframe>
parent page Calling child page
Mapframe. Child ();//mapframe is the name value of the frame in the parent page, and the method
Set the ID:document.getElementById (' Iframeid ') to the IFRAME. CONTENTWINDOW.ABC (); ABC () is a sub-page function
Child page called parent page
Window.parent. Parent ()
The third type: Using window.showModalDialog (), open a new window
ShowModalDialog ('/window.jsp ', window, ' Dialogheight:300px;dialogwidth:600px;status=off ');
Parent page cannot invoke a child page method
Child page called parent page
Window.dialogarguments. Parent ();
Calls between parent and child pages in JavaScript