加入有三个页面:index.htm,left.htm,right.htm
index.htm为主页,left.htm、right.htm分别为它的左框架和右框架页面。index.htm的主要代码如下:
<frameset cols="27%,*">
<frame name="left" src="left.htm">
<frame name="right" src="right.htm">
<noframes>
<body> <p>此网页使用了框架,但您的浏览器不支持框架。</p> </body>
</noframes>
</frameset>在left.htm中写这样的一段代码即可实现你需要的效果。
<body onload=init()>
<script language="javascript">
function init(){
alert("");
window.parent.window.right.location.reload();
}
</script>
</body>