For example, when you call a () function, you write:
| The code is as follows |
Copy Code |
|
WINDOW.PRAENT.A (); |
But I found out that this method is not valid in Chrome browser.
Call this function in the parent page
| The code is as follows |
Copy Code |
|
<script>
function Dey () {
var cards_frame=document.frames ("Card-iframe"); Card-iframe is the name of the IFRAME.
Cards_frame.checkedcard ()//Invoke the method defined in the IFRAME to upload the value of the embedded page to the parent page
}
</script> |
2 The method to invoke the parent page definition in the IFRAME
| The code is as follows |
Copy Code |
|
function Alert_window (picurl,h_id)
{
Document.parentWindow.parent.msg (picurl,h_id);
}
MSG () is a function defined by the parent window. |
Card-iframe is the id,b () of the IFRAME frame as the Sub page JS function. Contentwindow property is the specified frame or the Window object where the iframe is located, ie can be omitted.