var childWin = window.open("your URL");    //获取子窗口句柄
childWin.onunload = function(){ //onunload是窗口关闭事件
this.opener.location.reload(); //childWin.opener为父窗口,及时刷新
} 楼主也可以这样:(直接在子窗口中)
window.onunload = function(){
this.opener.location.reload();
}
更为简洁。。。

js window.open()实现打印,如何在关闭打印窗口时刷新父窗口的更多相关文章

  1. JS实现关闭当前子窗口,刷新父窗口

    一.JS实现关闭当前子窗口,刷新父窗口 JS代码如下: <script> function refreshParent() {  window.opener.location.href = ...

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

    一.js实现关闭当前子窗口,刷新父窗口 JS代码如下: <script> function refreshParent() {  window.opener.location.href = ...

  3. 更新记录后关闭子窗口并刷新父窗口的Javascript

    有时我们需要在新打开的窗口里面编辑信息,等编辑完了,需要将当前窗口关闭并且刷新父窗口,以使修改生效,本文就是介绍用 javascript 来实现"更新记录后关闭子窗口并刷新父窗口" ...

  4. 关闭open页面时刷新父页面列表

    var winObjEI = window.open("/Invoice/InvoiceViewEI?invoiceid=" + data.InvoiceId); ; //关闭op ...

  5. layer.js关闭子窗口及刷新父窗口

    在需要layer.js弹窗口时,当编辑完窗口内容,需要关闭及刷新父窗口时: $("#senddata").click(function(){var id = $('input[na ...

  6. js关闭子窗口,刷新父窗口

    父页面js:function btnAdd_onclick() {window.open("xxx.jsp", "","height=600, wid ...

  7. web 打开子窗口提交数据或其他操作后 关闭子窗口且刷新父窗口实现

    父页面 : html连接:<a href="javascript:void(0)" onclick="window.open(子页面URL)">js ...

  8. layer关闭当前窗口并刷新父窗口

    window.parent.location.reload(); var index = parent.layer.getFrameIndex(window.name); parent.layer.c ...

  9. window.open窗口关闭后刷新父窗口代码

    window.open窗口关闭后刷新父窗口代码 window.opener.location.href=window.opener.location.href;window.close();

随机推荐

  1. 蓝牙Ibeacon室内定位和微信摇一摇周边原理分析

    苹果推出Ibeacon室内定位技术是为了弥补GPS无法覆盖室内定位这种场景.苹果意味着创新,在其推动下,蓝牙Ibeacon得到了极大的应用.而腾讯则是利用蓝牙Ibeacon在场景体验方面进行了创新,实 ...

  2. android 定制自己的日志工具

    最理想的情况是能够控制日志的打印,当程序处于开发阶段就让日志打印出来,当程序上线之后就把日志屏蔽掉. 例如打印一行WARN级别的日志就可以写成这样: LogUtil.w("TAG" ...

  3. JSON取值前判断

    public static void main(String[] args)throws Exception{ String jsonStr1="{\"access_token\& ...

  4. Head First HTML CSS XHTML笔记

    最近在看点前端的东西,看到了这本入门级的好书 <head></head>中的title和style <q></q> inline元素 在<p> ...

  5. check the element in the array occurs more than half of the array length

    Learn this from stackflow. public class test { public static void main(String[] args) throws IOExcep ...

  6. Hbase step by step 完全分布式安装

    Step1: download and extract the packages: http://mirror.bit.edu.cn/apache/hbase/stable/ Step2: set t ...

  7. zookeeper中Watcher和Notifications

    问题导读:1.zookeeper观察者什么时候调用?2.传统远程轮询服务存在什么问题?3.zk中回调服务的机制是什么?4.zk中watcher为什么不永久注册?5.什么是znode? 在阅读之前首先明 ...

  8. java截取日期范围并计算相差月数

    前两天,媳妇单位让整理excel的某一个单元格内两个日期范围的相差月数,本人对excel操作不是很熟练,便写了个小程序计算了一下,原始需求如下: 计算投资期限的范围,并得到期限范围的相差月数 思路1: ...

  9. java在url传输前更改字符编码

    几种方式 1. String s = "sds"; s = new String(data_id.getBytes("UTF-8")); 2. 使用get请求 ...

  10. Verilog (二) multiplexer and decoder

    1  mutiplexer 数据选择器 1)  one-bit wide 2-1 mux wire dout = sel? din1 : din0; // conditional continuous ...