弹出新窗口,填写数据并提交,关闭页面,刷新父窗口.

yuan_2004 2007-12-05 05:12:51
父窗口father.jsp
<html >
<head>
<title>父窗口</title>
<script>
function registerJump() {
var returnValue = window.opendlg("son.jsp",600,400);
if(returnValue == 'ok') {
window.location.reload();
}
}
</script>
</head>
<body>
<form name=”form”>
<input type=”text” name=”text” ><br/>
<input type=”button” name=”submit” value=”submit” onClick=”j ump();”/>
</form>
</body>
</html>

子窗口son.jsp
<html >
<head>
<title>子窗口</title>
</head>
<body onunload=”window.returnValue=’ok’ ”>
<form name=”form2”>
<input type=”text” name=”text” ><br/>
<input type=”submit” name=”submit” value=”submit” />
</form>
</body>
</html>

关闭子窗口后,父窗口就会刷新.
...全文
139 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yuan_2004 2007-12-21
  • 打赏
  • 举报
回复
modal
BlueDestiny 2007-12-10
  • 打赏
  • 举报
回复
是弹窗还是modal窗口?

弹窗
子:
window.opener.location.reload();
window.close()

87,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧