There is a project that needs to be completed with a framework, in which the parent framework is found to have compatibility issues with the implementation of the content in the child framework, which is hereby recorded!
<iframe id= "Preview" name= "preview" src= "Bill.php?page=preview" frameborder= "0" width= "100%" ></iframe>
This is my framework and I'm ready to manipulate the DOM in the framework. So I used it,
As a result, I found that I did not have a test on the IE8 and other versions.
The reason is: Contentwindow compatibility problem, in IE does not have this attribute.
After debugging, this attribute is not required and is used directly
You can do it. Fantastic question, but it's not compatible with other browsers.
So my final solution is to:
container=preview.contentwindow?$ (Preview.contentWindow.document.body): $ (preview.document.body);
Do not copy the code, I used the JQ, so please understand the original after use, you spectators.
The parent frame invokes the problem record for the content in the child frame