页面转换

wuj 2004-09-21 09:59:13
我在guahaoindex.jsp页面里分割为三个部分guahao_top.jsp、guahao_left.jsp、guahao_mainbottom.htm,代码如下,点击guahao_left.jsp里相应的菜单就在guahao_mainbottom.htm处显示相应的页面,guahaoindex.jsp页面是在从登陆界面index.jsp登陆成功后就进入的,我想点击“退出”的时候,整个页面都回到index.jsp页面,可是上面的链接是不正确的,只有guahao_left.jsp返回到index.jsp,我的目的是整个页面都转回去,代码怎么写
guahaoindex.jsp
<%@page contentType="text/html;charset=gb2312"%>
<html>
<head>
<title>门诊挂号系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<frameset rows="102,*" cols="1,*" frameborder="YES" border="1" framespacing="1">
<frame src="../guahao/guahao_mainbottom.htm">
<frame name="topFrame" scrolling="NO" noresize src="../guahao/guahao_top.jsp" >
<frame src="../guahao/guahao_mainbottom.htm">
<frameset cols="190,*" frameborder="NO" border="1" framespacing="2" >
<frame name="leftFrame" src="../guahao/guahao_left.jsp"target='_mainFrame'>
<frame name="mainFrame" src="../guahao/guahao_mainbottom.htm">
</frameset>
</frameset>

<noframes>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>
</html>
guahao_left.jsp
<%@ page session="true" %>
<%@page contentType="text/html;charset=gb2312"%>
<html>
<head>
<title>挂号信息列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="300">
</head>

<body bgcolor="#e77100" text="#000000">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<TR>
<TD bgColor=#e77100 height=331 width=500>
<HR color=#c0c0c0>

<P style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px"><IMG border=0 height=12
src="../images/dot.gif" width=20><a href="guahao_mainbottom.jsp " target="mainFrame"><font color="#3300FF">挂号</font></a></P>
<HR color=#c0c0c0>

<P style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px"><IMG border=0 height=12
src="../images/dot.gif" width=20><a href="register.jsp " target="mainFrame"><font color="#3300FF">注册</font></a></P>
<HR color=#c0c0c0>

<P style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px"><IMG border=0 height=12
src="../images/dot.gif" width=20><a href="search.jsp " target="mainFrame"><font color="#3300FF">查询</font></a></P>
<HR color=#c0c0c0>

<P style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px"><IMG border=0 height=12
src="../images/dot.gif" width=20><a href="password.jsp " target="mainFrame"><font color="#3300CC">密码修改</font></a></P>
<HR color=#c0c0c0>

<P style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px"><IMG border=0 height=12
src="../images/dot.gif" width=20><A
href="../frame/index.jsp" ><font color="#3300FF">退出</font></A></P>
<HR color=#c0c0c0>

<P style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px"><IMG border=0 height=12
src="../images/dot.gif" width=20><A
href="inform.jsp" target="mainFrame"><font color="#3300FF">最新通知</font></A></P>
<HR color=#c0c0c0>

<P align=center style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px">  </P>
<P align=center style="MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px">  </P></TD>
<TD height=345 rowSpan=2 vAlign=bottom width=428> 
<P> </P></TD></TR>
</table>
</body>
</html>
guahao_mainbottom.htm
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FF9933" text="#000000">
</body>
</html>
...全文
124 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cory 2004-10-04
  • 打赏
  • 举报
回复
同上
禽兽v5 2004-10-04
  • 打赏
  • 举报
回复
<html>
<head>
<script>
function all_exit()
{
if ( window.top != null ) // 在框架页中
{
window.top.location.href = '../frame/index.jsp';
}
else // 不在框架页中
{
window.location.href = '../frame/index.jsp';
}
}
</script>
</head>
<body>
<A href="javascript:all_exit()"><font color="#3300FF">退出</font></A>
</body>
diaopeng 2004-10-04
  • 打赏
  • 举报
回复
在left页面中使用javascript就可以了,
parent.location = "index.jsp"

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧