JS Open Window Parent-child window operation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.