主画面弹出模式对话框,要求在模式对话框画面能[color=red]单次[/color]动态操作主画面内容可以通过window.returnValue来实现
[color=red]多次[/color]动态操作主画面内容可以通过传递主画面的函数到弹出页面来实现
Firefox下window.showModalDialog弹出的模式对话框画面,画面自提交后,window.dialogArguments[color=red]会丢失[/color],同时window.opener属性[color=red]存在[/color]
而IE下下window.showModalDialog弹出的模式对话框画面,画面自提交后,window.dialogArguments[color=red]不会丢失[/color],同时window.opener属性[color=red]不存在[/color]
兼容的做法(没有测试过IE,Firefox以外的浏览器)
[color=red]多次[/color]动态操作主画面内容可以通过传递主画面的函数到弹出页面来实现
Firefox下window.showModalDialog弹出的模式对话框画面,画面自提交后,window.dialogArguments[color=red]会丢失[/color],同时window.opener属性[color=red]存在[/color]
而IE下下window.showModalDialog弹出的模式对话框画面,画面自提交后,window.dialogArguments[color=red]不会丢失[/color],同时window.opener属性[color=red]不存在[/color]
兼容的做法(没有测试过IE,Firefox以外的浏览器)
var callBack = null;
// IE浏览器 (画面自提交后,window.dialogArguments不会丢失,同时window.opener属性不存在)
if ($.browser.msie){
callBack = window.dialogArguments;
}
else
{
// Firefox浏览器(画面自提交后,window.dialogArguments会丢失,同时window.opener属性存在),
if (window.opener.callBack == undefined) {
window.opener.callBack = window.dialogArguments;
}
callBack = window.opener.callBack;
}