frameset session逾期登录窗口跳到parent

frameset session过期登录窗口跳到parent最近项目用到frameset布局,右边为主页面,当在session过期的时候登

frameset session过期登录窗口跳到parent

最近项目用到frameset布局,右边为主页面,当在session过期的时候登录窗口就会在右边的主窗口中显示出来,但是我想要的效果是直接显示在parent中,下面代码就可以实现:

<script type="text/javascript">if (top.location != self.location){     top.location=self.location;     }</script>

?