一个主网页(index.html)由四个框架(top.html、left.html、right.html、buttom.html)组成,我在头部(top.html)中的写了个退出链接,对它编写了JS的window.close()方法,使整个页面(index.html)退出。现在的情况是,点击了退出后,只是框架里的top.html退出了,要如何编码使得整个页面都退出?主页面没有body,代码如下:
<frameset rows="6%,*" cols="*">
<frame name="Top" src="top.html" noresize="noresize" scrolling="no"/>
<frameset cols="20%,*">
<frame name="Left" src="../新建文件夹/Menu.html" noresize="noresize" scrolling="no"/>
<frame name="Right" src="../新建文件夹/BugMian.html" noresize="noresize" scrolling="no"/>
</frameset>
</frameset>
<noframes></noframes>top.html页面的的代码如下:
<html>
<script language="javascript">
window.onbeforeunload = function(){
return "您确定要退出页面吗?"; }
</script>
<head>
<title>系统简介</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.STYLE1 {font-size: medium}
-->
</style>
</head>
<body bgcolor="#0096e1" text="#000000" topmargin="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="53%"> <span class="STYLE1">BugEasy</span>
</td>
<td valign="middle">
<table border="0" align="right" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100"><a href="../新建文件夹/editMyInformation.html" target="_blank">编辑我的信息</a></td>
<td width="89"><a href="mailto:[email protected]">求助中心</a></td>
<td width="91"><a href="SysInfo.html" target="_blank">系统简介</a></td>
<td width="89"><a href="">退出</a></td>
</table>
</td>
</tr>
</table>
</body>
</html>
<frameset rows="6%,*" cols="*">
<frame name="Top" src="top.html" noresize="noresize" scrolling="no"/>
<frameset cols="20%,*">
<frame name="Left" src="../新建文件夹/Menu.html" noresize="noresize" scrolling="no"/>
<frame name="Right" src="../新建文件夹/BugMian.html" noresize="noresize" scrolling="no"/>
</frameset>
</frameset>
<noframes></noframes>top.html页面的的代码如下:
<html>
<script language="javascript">
window.onbeforeunload = function(){
return "您确定要退出页面吗?"; }
</script>
<head>
<title>系统简介</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.STYLE1 {font-size: medium}
-->
</style>
</head>
<body bgcolor="#0096e1" text="#000000" topmargin="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="53%"> <span class="STYLE1">BugEasy</span>
</td>
<td valign="middle">
<table border="0" align="right" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100"><a href="../新建文件夹/editMyInformation.html" target="_blank">编辑我的信息</a></td>
<td width="89"><a href="mailto:[email protected]">求助中心</a></td>
<td width="91"><a href="SysInfo.html" target="_blank">系统简介</a></td>
<td width="89"><a href="">退出</a></td>
</table>
</td>
</tr>
</table>
</body>
</html>
<a href="AdminIndex.html" target="top.location.herf='AdminIndex.heml'">退出</a>
<a href=''>
或者self.parent.close()