js技巧汇总

1、window.open()打开一个子页面,在子页面关闭时刷新父页面
子页面关闭事件代码:window.opener.location.href=window.opener.location.href;window.close();
2、window.showModelessDialog(url,winName,{})打开一个子页面,在子页面关闭时刷新父页面
var win = window.dialogArguments; window.close(); win.location.reload();
3、window.showModelessDialog(url,window,{})打开一个子页面,在子页面关闭时关闭父页面
// 父页面的showModelessDialog“窗口名称”直接传window                                                                                           var win = window.dialogArguments; window.close(); win.close();                                                                           
posted @ 2015-01-07 15:15  【云】风过无痕  阅读(104)  评论(0编辑  收藏  举报