模态对话框showModalDialog,打开的子页面返回returnValue,刷新父页面

来源:互联网 发布:python 前端开发 编辑:程序博客网 时间:2024/05/29 13:16

子页面
alert('更新成功'); window.returnValue=2;window.close();


父页面
var obj = window.showModalDialog(url, null, "scroll:no;dialogWidth:700px;DialogHeight:300px;status:0;help:0;center:1");
            if (obj == 2) {
                window.location.href = window.location.href;
            }

0 0
原创粉丝点击