第一种方法:
|
父窗口代码
<a href="#" onclick="window.open('child.html','child','width=400,height=300,left=200,top=200');">打开子窗口</a>
子窗口代码
<script language="JavaScript" type="text/javascript">
function refreshParent()
- { window.opener.location.href = window.opener.location.href;
- if (window.opener.progressWindow)
- {
- window.opener.progressWindow.close();
- }
- window.close();
- }
- </script>
|
防止弹出的子窗口,再弹出窗口可在:
|
<head>
<base target= "_self " />
</head>
|
第二种方法:
如何点击按钮弹出新窗口,输入数据后返回并刷新页面?
作者:孟宪会 出自:【孟宪会之精彩世界】
http://dotnet.aspx.cc/ShowDetail.aspx?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4