父页面:
funciton Open1(){
var ret = showModalDialog(url,window,'dialogHeight:height;dialogWidth:width;center:yes;help:no;');
}
添加两个按钮,一个用来调用上面的函数,一个用来刷新页面。
子页面:
fcuntion OK(){
window.parent.returnValue=true;window.dialogArguments.document.getElementById('Button1').click();
}
添加一个按钮,完成操作之后,运行此函数即可。
关键:通过window.dialogArguments来得到父窗口对象。