JS实现关闭当前子窗口,刷新父窗口及调用父窗口的方法

一、js实现关闭当前子窗口,刷新父窗口

 

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()" />

 

二、JS子窗口与父窗口之间的调用

地址:http://azrael6619.iteye.com/blog/486079

posted @ 2017-07-26 12:30  chenxiangxiang  阅读(17342)  评论(0编辑  收藏  举报