我正在html(GUI)中使用框架集。我的GUI由四部分组成:页眉,页脚,侧面导航和内容页面。
现在,我提供了标题框架集中的注销按钮功能。重定向后,新的JSP页面仅显示在标题中,而不显示在窗口中(窗口仍包含上述所有框架集)
我想在整个窗口上显示此新的重定向页面。
您应该在客户端执行此操作。
<form action="/logout" method="post" target="_top">
<input type="submit" name="logout" value="Logout">
</form>
如果您重定向到的页面之一不应该包含外部框架,则可以使用javascript突围
// run this javascript on the logout landing page and it will remove the frames
if (parent.frames.length>0){
parent.location.href=self.document.location;
}