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

JS代码如下:

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

 

html页面代码如下:

<input type="button" disabled=true onclick="refreshParent()" />

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

 

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

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-09-03
  • 2022-12-23
相关资源
相似解决方案