Iframe Onload Event
The iframe element has an onload event, and although the iframe onload attribute is not valid in HTML4, it is valid in HTML5. Here is an example:
<iframe id="ifrm" src="demo.html" onload="doSomething()"></iframe>
Another option: you can include an onload handler in the iframed document itself. All browsers in current use support all three approaches.
Note: Onload events are fired on iframe elements before they are fired on the containing document. See iframe onload in use in Access to Iframe and Contents.