JSP和HTML框架集

问题描述 投票:0回答:2

我正在html(GUI)中使用框架集。我的GUI由四部分组成:页眉,页脚,侧面导航和内容页面。

现在,我提供了标题框架集中的注销按钮功能。重定向后,新的JSP页面仅显示在标题中,而不显示在窗口中(窗口仍包含上述所有框架集)

我想在整个窗口上显示此新的重定向页面。

html jsp user-interface session frameset
2个回答
0
投票

您应该在客户端执行此操作。

<form action="/logout" method="post" target="_top">
<input type="submit" name="logout" value="Logout">
</form>

0
投票

如果您重定向到的页面之一不应该包含外部框架,则可以使用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;
}
© www.soinside.com 2019 - 2024. All rights reserved.