日期:2014-05-17  浏览次数:20967 次

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