http://zhidao.baidu.com/question/61358246.html?an=0&si=1 JS Open Window Parent-child window operation
parent Window JS Code: functionopencrawlpage (){varCrawlwin = window.open ("/createreportcrawl.do?" Type=1&ao=y ","Crawl_window","Width=1000,height=600,top=80,left=50,scrollbars=yes,alwaysraised=yes");}functionopenprocpage (){varProcwin = window.open ("/createreportprocess.do?type=1&ao=y","Proc_window","Width=1000,height=600,top=80,left=50,scrollbars=yes,alwaysraised=yes"); //alert (Procwin);}functionsetopencallback (data){alert (data);}
child window JS code://Key "opener" (meaning the open person, which is the page that pops up the window)This object usage, before the window is OK,Returns the reference to the parent window that created the current window is compatible with multiple browsers (I look at the JS structure, showing that he is included in the window, the role can be equivalent to window, can be manipulated to bring up the popup window of the page)such as: window.opener.document//Invoke element Window.opener.setOpenCallback ("Call the parent window's XML element or function to assign a value, the child window can manipulate any XML element and function of the parent window"); add: "Parent" operation of the current window's parents window
search under "opener" Can
JS Open Window Parent-child window action