当前位置: 代码迷 >> Java Web开发 >> frame内元素跳出框架有关问题
  详细解决方案

frame内元素跳出框架有关问题

热度:6948   发布时间:2013-02-25 21:21:05.0
frame内元素跳出框架问题
页面嵌套在frame里

<frameset rows="*" cols="181,*" framespacing="0" frameborder="1" border="false" id="frame" scrolling="yes">
  <frame name="left" scrolling="auto" marginwidth="0" marginheight="0" src="Left.jsp">
  <frameset framespacing="0" border="false" rows="35,*" frameborder="0" scrolling="yes">
  <frame name="top" scrolling="no" src="Top.jsp">
  <frame name="main" scrolling="auto" src="abc.jsp">
  </frameset>
</frameset>


设置了个过滤器。进入abc.jsp,当session里没有内容时,自动跳到index.jsp页面,

问题是index.jsp仍然嵌套在frame里(index.jsp页面显示在页面的右半边窗口)


请问如何让当session里没有内容时,跳到index.jsp,且让index.jsp自动跳出frame


------解决方案--------------------------------------------------------
target=_parent
------解决方案--------------------------------------------------------
_parent.location.href="你的地址";
或者target=_parent
  相关解决方案