你试试下面的代码:
<input type=button value="刷新父窗口" onclick="opener.reload();">
<input type=button value="刷新父窗口" onclick="opener.reload();">
解决方案 »
- 希望能请PHP高手帮忙解密一段代码,谢谢。
- [求助][PEAR]关于PEAR安装的问题.
- 求解!! php怎么实现上传的图像存储在对应相册
- php preg_replace函数正则替换问题!望高手授业解惑~~小妹感激不尽
- 大家好!今天我在安装window2003 中安装时遇到不能显示的问题?有谁能帮帮忙?谢谢
- 最近我在用PHP开发一个电子商务网站,遇到不少问题,请问哪里有电子商务整站代码啊,参考一下
- [求救]php中有没有简单的可以对字符串加密解密的函数?
- 请 alexzhang00(三角猫(sjcatsoft)) 进来拿分,谢谢解答php操控MYSQL的问题
- linuxRedhat8上,如何让apache支持.php3的文件?
- 一个有关编写的聊天室的问题?
- 我使用字符串变量时出现的问题?
- "Fatal error: Call to a member function on a non-object in "是什么原因造成的?
<input type=button value="刷新父窗口" onclick="opener.reload();">
parent.htm
-------------
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Name</title>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--">
<p>Name:<input type="text" name="name" size="20"><br>
Age:<input type="text" name="age" size="20"><input type="button" value="打开子窗口" name="B3" onclick="window.open('children.htm','test');"></p>
</form>
</body>
</html>子窗口如下所示:
children.htm
----------------
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Name</title>
</head><body><form method="POST" action="--WEBBOT-SELF--">
<p>
Name:<input type="text" name="name" size="20"><br>
Age:<input type="text" name="age" size="20">
<input type="button" value="传给父窗口" name="B3" onclick="opener.document.all.name.value=document.all.name.value;opener.document.all.age.value=document.all.age.value;"></p>
</form>
</body>
</html>
你可以根据你的需要适当的调整。
<a href=# onclick="window.open('b.php','','');">open window</a>b.php:
<form name=form1>
<input name=xxx>
<input type=button value=send onclick="opener.location='a.php?xxx='+this.form.xxx.value;self.close()">
</form>
将xxx的值以get方式传给了a.php