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. 【原】训练自己haar-like特征分类器并识别物体(2)

    在上一篇文章中,我介绍了<训练自己的haar-like特征分类器并识别物体>的前两个步骤: 1.准备训练样本图片,包括正例及反例样本 2.生成样本描述文件 3.训练样本 4.目标识别 == ...

  2. onmousedown,onmouseup,onclick同时应用于一个标签节点Element

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...

  3. jQuery学习笔记:整理一些常用的jQuery操作DOM事件

    1.attr() .removeAttr() .attr() 方法可以传入一个名值对的参数,也可以传入一个包含2个以上名值对的对象参数,例如: .attr('src','images/a.jpg'); ...

  4. select_tag in rails about selected not change and onchange()

    make it more easy after http://www.cnblogs.com/juandx/p/4058399.html 1  if you want the selected is ...

  5. Effective Java 60 Favor the use of standard exceptions

    Benefits to reuse preexisting exceptions It makes your API easier to learn and use. Programs using y ...

  6. Effective Java 62 Document all exceptions thrown by each method

    Principle Always declare checked exceptions individually, and document precisely the conditions unde ...

  7. Linux下恢复删除的文件

    转自:http://github.tiankonguse.com/blog/2015/09/13/linux-remove-recovery/ 下午, DBA找我说有些SQL执行了两个小时了,导致主从 ...

  8. 关于Redis中的serverCron

    1.serverCron简介 在 Redis 中, 常规操作由 redis.c/serverCron 实现, 它主要执行以下操作 /* This is our timer interrupt, cal ...

  9. PE文件结构部分解析以及输入的定位

    原文链接地址:http://www.cnblogs.com/shadow-lei/p/3554670.html PE文件定义 PE 文件("Portable executable" ...

  10. 应用Spring MVC发布restful服务是怎样的一种体验

            摘要:“约定优于配置”这是一个相当棒的经验,SOAP服务性能差.基于配置.紧耦合,restful服务性能好.基于约定.松耦合,现在我就把使用Spring MVC发布restful服务的 ...