1.
<IFRAME SRC="a.html" id=f1 height=30 width=40 onreadystatechange="if (this.readyState=='complete') alert('IFRAME load OK')"></IFRAME>2.
<frame name="a" src="a.html" scrolling="no" noresize onreadystatechange="if (this.readyState=='complete') alert('FRAME load OK')">
<IFRAME SRC="a.html" id=f1 height=30 width=40 onreadystatechange="if (this.readyState=='complete') alert('IFRAME load OK')"></IFRAME>2.
<frame name="a" src="a.html" scrolling="no" noresize onreadystatechange="if (this.readyState=='complete') alert('FRAME load OK')">
上面的语句不行,IFRAME已经加载完成,没有弹出消息 我用的是ie5
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function aa()
{
if (top.a.document.all&&top.b.document.all)
{
alert("加载完毕")
}
}
window.onload=aa;
</script>
<title>新建网页 1</title>
<frameset cols="*,*">
<frame name="a" src="left.htm">
<frame name="b" src="right.htm">
</frameset></html>这段代码我有IE 5上试得没有问题
iframe onreadystatechange的事件只用于ie5.5以上版本
frame不支持onreadystatechange的事件你判断代码可以加在装载的页面内作判别
document.onreadystatechange = function(){
alert("load OK");
}