<html>
<body>
<p>This example uses the addEventListener() method to attach a "load" event to an iframe element.</p>
<iframe id="myFrame" src="../default.html"></iframe>
<p id="demo"></p>
<script>
document.getElementById("myFrame").addEventListener("load", myFunction);
function myFunction() {
document.getElementById("demo").innerHTML = "Iframe is loaded.";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onload_addeventlistener by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:59 GMT -->
</html>