打开一个模态窗口:
window.showModalDialog(url,window,"dialogWidth:950px; dialogHeight:450px; help: no; status: no");
模态窗口如果提交form,会弹出一个新窗口,即使为form指定了 target="_self" 也是不行的。
那么要如何解决呢?
其实很简单,加上以下代码:
<script type="text/javascript">
window.name = "curWindow";
</script>
对应的form添加target:
<form name="myForm" id="myForm" action="" method="post" target="curWindow">
转自:http://www.360doc.com/content/11/0223/17/4154133_95474400.shtml