<html>
<script type="text/javascript">
onload = function(){
eventPush(document.getElementById('myiframe'),'load',function () {myFrameOnloadFunction();});
document.getElementById('myiframe').src = 'http://www.google.com'
}
function eventPush(obj, event, handler) {
if (obj.addEventListener) {
obj.addEventListener(event, handler, false);
} else if (obj.attachEvent) {
obj.attachEvent('on'+event, handler);
}
}
function myFrameOnloadFunction(){
alert('iframe loaded')
}
</script>
<body>
<iframe id="myiframe"></iframe>
</body>
</html>
|