日期:2014-05-18  浏览次数:20843 次

使用frameset怎么让做才能退出登陆后跳转到另一个页面啊?
我用的是frameset框架,在框架上一个页面有退出登陆的链接,现在点击这个链接能将session清空,但是跳转不是整个frameset跳到新页面,只是有退出登陆链接的那个页面跳转到了新页面.
用javascript把退出登陆做成关闭窗口的链接也不行,在frameset中好象不起作用.
我该怎么做才能使整个frameset页面跳转到新页面啊?   或者用别的方法做退出登陆?

------解决方案--------------------
like this:

mainFrame.jsp
<%@ page contentType= "text/html; charset=gb2312 " language= "java " import= "java.sql.* " errorPage= " " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> ::::::::::::::厦门新闻出版局---功能页:::::::::::::::::::: </title>
<frameset cols=15%,86% id= "parentFrame ">
   <frame src= "leftMenu.jsp " name= "left " >
   <frameset rows=4%,* cols= "* " framespacing= "0 " frameborder= "0 ">
     <frame src= "top.jsp " name= "top " frameborder= "0 " marginheight= "0 " marginwidth= "0 " scrolling= "no " >
     <frame src= "userManage.jsp " name= "main ">
   </frameset>
</frameset>
<noframes> </noframes>

logout.jsp
<%@ page
language= "java "
contentType= "text/html;charset=gb2312 "%>
<%
session.removeAttribute( "LoginID ");
session.removeAttribute( "Role ");
out.println( " <script> ");
out.println( "window.top.location.href= 'index.jsp '; ");
out.println( " </script> ");
%>
------解决方案--------------------
楼上
------解决方案--------------------
比如login是登录检测、用户注销的servlet的mapping 在HyperLink中设置目标为顶层框架,如果_top不行,试一下_parent
------解决方案--------------------
parent.location= ' ';