关闭当前的子窗口,刷新父窗口,弹出层提示框

近期,在做后台的管理页面,为了有更好的用户体验,需要实现关闭当前页面,刷新父窗口,在网上查找方法,如下:

JS代码如下:

<script>
 function refreshParent() {
  window.opener.location.href = window.opener.location.href;
  window.close();  
 }              
</script>

 

html页面代码如下:

<input type="button" id="btn1" class="btn" value="同意" disabled=true onclick="refreshParent()" />

原文地址【http://blog.sina.com.cn/s/blog_4a0c5a940100vza1.html】

 

除此之外,我还在另外的地方做了弹出层作为提示:

posted @ 2015-01-06 14:46  suhanyujie  阅读(750)  评论(0编辑  收藏  举报