我希望以模态弹出窗口的形式打开window.open
。
var features = 'resizable= yes; status= no; scroll= no; help= no; center= yes;
width=460;height=140;menubar=no;directories=no;location=no;modal=yes';
window.open(href, 'name', features, false);
我可以使用Window.ShowModelDialog()
,但在我的子窗口中,我正在调用父JavaScript方法。 使用ShowModelDialog()时没有发生这种情况。
function CallParentScript(weburl) {
alert(weburl);
if (weburl != null) {
var url = weburl;
window.opener.SelectUserImageCallback(url);
window.close();
return false;
}
}
如果我使用 window.open()
,可以调用父窗口的 JavaScript。但是该窗口不是模态窗口。如何解决这个问题?我能在子弹窗口中编写什么来使其始终置顶吗?