frameSet中frame的刷新问题(急)
问题如下:
有三个框架
<frameset rows="80,*" cols="*" frameborder="No" border="1" framespacing="0">
<frame src="top.jsp" name="banner" scrolling="NO" noresize >
<frameset rows="*" cols="120,*" framespacing="0" frameborder="No" border="1" bordercolor="#CCCCCC">
<frame src="left.jsp" name="left" scrolling="yes" frameborder="NO" border="0" noresize>
<frame src="main.jsp" name="main">
</frameset
></frameset>
</frameset>
其中main.jsp为
<%response.setHeader("Pragma","No-cache"); %>
<%@ page contentType="text/html; charset=gb2312" %>
<html>
<head>
<script language="javascript">
function window.onbeforeunload() {
if(event.clientX>document.body.clientWidth&&event.clientY<0 ¦ ¦event.altKey)
{
}else {
alert("你在刷新")
}
window.location.reload();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>New Page 3</title>
</head>
<body bgcolor="#C6DFFE">
</body>
</html>
在left.jsp页面中我连续执行了下面的方法(使用循环)
ONCLICK="vbscript:window.parent.main.location='+menuItems[i].aURL
但只有第一次页面载入时执行了main.jsp页面中的window.onbeforeunload() 方法,后面没有在执行它。
请问怎样才能在left.jsp执行ONCLICK="vbscript:window.parent.main.location='+menuItems[i].aURL语句时让main.jsp中的方法都执行一次?