A sample discussion on the problem of Ifame parent window calling child window under Chrome

Source: Internet
Author: User

This article mainly introduced the Chrome ifame the parent window to invoke the child window the question, needs the friend to be possible to refer to under

One of the browser incompatibilities encountered in the project: under IE and Firefox, the JS function that invokes the child window with the name of the child window in the parent window of the Ifame frames page is so good that it doesn't work in chrome. The code is as follows: <frameset rows= "108,*,30" border= "0" framespacing= "0" frameborder= "0" > <frame name= "header" scrolling= " No "noresize src=" Base/header "/> <frame id=" Memumain "name=" main "scrolling=" no "noresize src=" ${ctx}/index.jsp " /> <frame name= "footer" scrolling= "no" noresize src= "Base/footer"/> <noframes> <body> <p> This The Web page uses frames, but your browser does not support frames. </p> </body> </noframes> </frameset> under IE and Firefox can be written like this: The code is as follows: function Changemenu (menu_id)  {Header.window.changeMenu (menu_id);  Or is: The code is as follows: function Changemenu (menu_id) {frames[0].changemenu (menu_id); You can, in Chrome only the second way, so you need to consider a variety of browser compatibility issues should use the second way.

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.