you can do as this : <iframe name="t" src="test.htm" onload="yourFunc()"></iframe>obj.frames["frameID"]:Retrieves a window objects defined by the given ID.This window object only and DOES NOT provide access to the corresponding FRAME and IFRAME elements. To access these elements, use the 'all ' collection for the document containing the elements.
<script language="javascript">
<!--
document.getElementById("t").onreadystatechange = function(){
if( this.readyState == "complete" )
alert( "ok!" );
}
//-->
</script>
========================
window.frames["t"].onload = function(){
alert( "ok!" );
}
<iframe name="t" src="test.htm" onload="yourFunc()"></iframe>obj.frames["frameID"]:Retrieves a window objects defined by the given ID.This window object only and DOES NOT provide access to the corresponding FRAME and IFRAME elements. To access these elements, use the 'all ' collection for the document containing the elements.
而onreadystatechange刚好相反
这个方法不错~~~