iframe刷新页面时不刷新父页面

session过期之后刷新页面跳转到登陆页面的时候父页面不刷新,父页面里面包含登录的页面

一,iframe刷新父页面 
iframe页面是内嵌到父页面的,当点击iframe页面的服务器控件时,默认只刷新iframe页面,父页面是不会刷新的。若想刷新父页面,可以使用js来实现,如
 1. parent.location.reload();
 这种方法会重新加载整个页面。但如果要在原页面的基础上传递参数,则可以使用下面的方法:
 2.......
答案就在这里:iframe刷新父页面
----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

自己用用js刷新父页,或者登录页面不允许框架,登录页面加下面的代码

 if (window!=top) // 判断当前的window对象是否是top对象
top.location.href =window.location.href; // 如果不是,将top对象的网址自动导向被嵌入网页的网址


<br> function myfun(){<br> var _topWin = window; <br> while (_topWin != _topWin.parent.window) { <br> _topWin = _topWin.parent.window; <br> } if (window != _topWin)<br> _topWin.document.location.href = &quot;&lt;%=path %&gt;/moduleAdmin/login/login.jsp&quot;; <br> }<br> window.onload=myfun;//不要括号<br>


<br> function myfun(){<br> var _topWin = window; <br> while (_topWin != _topWin.parent.window) { <br> _topWin = _topWin.parent.window; <br> } if (window != _topWin)<br> _topWin.document.location.href = &quot;&lt;%=path %&gt;/moduleAdmin/login/login.jsp&quot;; <br> }<br> window.onload=myfun;//不要括号<br>
  1. function myfun(){ var _topWin = window; while (_topWin != _topWin.parent.window) { _topWin = _topWin.parent.window; } if (window != _topWin) _topWin.document.location.href = &quot;&lt;%=path %&gt;/moduleAdmin/login/login.jsp&quot;; } window.onload=myfun;//不要括号