A browser incompatibility problem encountered in the project:
In IE and Firefox, calling the js function of the Child Window using the name of the child window in the parent window of the ifame framework page is good, and it is difficult to make it in Chrome.
Copy codeThe 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 webpage uses a framework, but your browser does not support the framework. </P>
</Body>
</Noframes>
</Frameset>
In IE and Firefox, you can write as follows:
Copy codeThe Code is as follows:
Function changeMenu (menu_id ){
Header. window. changeMenu (menu_id );
}
Or:
Copy codeThe Code is as follows:
Function changeMenu (menu_id ){
Frames [0]. changeMenu (menu_id );
}
Yes,
In Chrome, only the second method can be used. Therefore, the second method should be used to consider compatibility issues with multiple browsers.