母視窗:
var modalObject = window.showModalDialog(url, window, 'dialogWidth:800px; dialogHeight:600px; status:0....')
子視窗:
var rtnObject = new Object();
rtnObject.rtVal = "Return Value!!";
window.returnValue = rtnObject;
...
window.close();
母視窗即可透過 modalObject 來取得子視窗回傳的值 ex: modalObject.rtVal
沒有留言:
張貼留言