var childWin = window.open("your URL"); //获取子窗口句柄childWin.onunload = function(){ //onunload是窗口关闭事件 this.opener.location.reload(); //childWin.opener为父窗口,及时刷新} 楼主也可以这样:(直接在子窗口中) window.onunload = function(){ this.opener.location.reload(); }更为简洁...…
一.JS实现关闭当前子窗口,刷新父窗口 JS代码如下: <script> function refreshParent() {  window.opener.location.href = window.opener.location.href;  window.close();   }              </script>…
一.js实现关闭当前子窗口,刷新父窗口 JS代码如下: <script> function refreshParent() {  window.opener.location.href = window.opener.location.href;  window.close();   }              </script> html页面代码如下: <input type="button" id="btn1" class=&qu…
有时我们需要在新打开的窗口里面编辑信息,等编辑完了,需要将当前窗口关闭并且刷新父窗口,以使修改生效,本文就是介绍用 javascript 来实现"更新记录后关闭子窗口并刷新父窗口". 父窗口代码: <a href="javascript:void(0)" onclick="window.open('child.html','child','width=400,height=300,left=200,top=200');">打开子窗口&…
var winObjEI = window.open("/Invoice/InvoiceViewEI?invoiceid=" + data.InvoiceId); ; //关闭open页面时刷新父页面列表 var loop = setInterval(function () { ) { isClose--; //这里写刷新代码 } }, ); isClose字段保证父页面只在子页面关闭时刷新一次.…
在需要layer.js弹窗口时,当编辑完窗口内容,需要关闭及刷新父窗口时: $("#senddata").click(function(){var id = $('input[name=id]').val();var amount = $('input[name=amount]').val();var star = $('input[name=star]').val();$.post("{:url('admin/card/editPart_Data')}",{id:…
父页面js:function btnAdd_onclick() {window.open("xxx.jsp", "","height=600, width=650, top=100, left=200,z-look=yes,toolbar=yes, menubar=no, scrollbars=yes, resizable=yes ,alwaysRaised=yes,location=no, status=yes" );} function re…
父页面 : html连接:<a href="javascript:void(0)" onclick="window.open(子页面URL)">js调用的方法: function closeWindow(object, isReload) { object.close(); isReload===true && window.location.reload();}子页面: $('#id').on('click',function(){ /…
window.parent.location.reload(); var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index);…
window.open窗口关闭后刷新父窗口代码 window.opener.location.href=window.opener.location.href;window.close();…