模态对话框点击链接不打开新窗口
方法1:
在模态窗口页面里加上:
<head>
<base target=_self >
</head>
''<base target=_self > ''放到<head>标签内
方法2
模态窗口里的页面放在frame或iframe里
子窗口用window.showModalDialog()弹出的模式对话框.
父窗口中弹出时:window.showModalDialog('子窗口.aspx',window,'....');
第二个参数用window,这样就把父窗口对象当做参数传递给了子窗口.
子窗口中就可以通过window.dialogArguments来引用父窗口对象.
例子,子窗体关闭的时刷新父窗体:
window.dialogArguments.location.href=window.dialogArguments.location.href;
window.focus();
window.close();
调用主窗口里的函数:
window.dialogArguments.函数名();
detailIframe.location.href = "${hrStaffURL}?method=userDefinedHome&page_id="+id+'&isReadOnly=ReadOnly&staffId=${staffId}&isManager=${isManager}';