日期:2014-05-18  浏览次数:20397 次

子页刷新父页时,如何给父页传参数?
父页开子页:window.open('b.aspx')
子页执行一个操作后要刷父页,我用的 window.opener.refresh();
但是现在我想让子页b在刷父页时给父页传个参数,该怎么办?

------解决方案--------------------
或以用showModalDialog();代替
js:
a.aspx
var s = showModalDialog('b.aspx','','dialogWidth:300px;dialogHeight:300px;help:no;status:no');
b.aspx里通过window.returnValue;返回值。

另:b.aspx里的<head>里加上<base target='_self' />来避免回发时弹出新窗口。