【问题标题】:JSP and HTML framesetJSP 和 HTML 框架集
【发布时间】:2011-10-04 19:24:21
【问题描述】:

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

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

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

【问题讨论】:

  • 我求求你们,请不要使用框架 - 每次使用框架制作新网站时,上帝都会杀死一只小猫。

标签: html jsp user-interface session frameset


【解决方案1】:

如果您重定向到的页面之一不应该有外框,您可以使用 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;
}

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-02
      • 2023-03-12
      • 2017-01-24
      • 2013-09-04
      • 2012-03-31
      • 1970-01-01
      • 2011-10-27
      • 1970-01-01
      相关资源
      最近更新 更多