父窗口打开子窗口页面:
var fatherWindow = document.all.dealReason;//想传的值
win =
window.showModalDialog(strUrl, fatherWindow,
"dialogWidth=800px;dialogHeight=600px;");
//strUrl是子窗口页面,fatherWindow是想传的值,win是子窗口返回的值
document.all.dealReason.value
= win;
子窗口:
var dialogArgument = window.dialogArguments.value;//取父窗口的值
window.returnValue = dialogArgument;//传值给父窗口
window.close();
父窗口window.showModalDialog传值 子窗口window.returnValue返回值,布布扣,bubuko.com
父窗口window.showModalDialog传值 子窗口window.returnValue返回值
原文:http://www.cnblogs.com/maizi1990/p/3715819.html