刷新父窗口怎么老在刷自己

apan300 2004-12-28 01:45:03
网上说用window.opener.location.reload(),
我用window.parent.location.reload(),也试了 怎么老在刷自己
aa.htm:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="recibir" method="post" action="">
<input name="info" type="text" id="info">
<input type="submit" name="Submit" value="popup" onClick="javascript:window.open('bb.htm');">
</form>
</body>
</html>
bb.htm
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<a href=# onclick="javascript:window.parent.location.reload();">refresh opener</a>
<form name="enviar" method="post" action="">
<input name="dato" type="text" id="dato">
<input type="submit" name="Submit" value="OK" onClick="opener();">
</form>
</body>
</html>
<script language="JavaScript">
<!--
function opener(){
//window.opener.location.reload();
window.parent.location.reload();
}
//-->
</Script>
...全文
83 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
梅雪香 2004-12-28
  • 打赏
  • 举报
回复
用window.open打开的窗口里用window.opener来访问父窗口
window.opener.location.reload();
lienzhu 2004-12-28
  • 打赏
  • 举报
回复
<a href=# onclick="javascript:window.parent.location.reload();return false;">refresh opener</a>

87,997

社区成员

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

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