如何跨窗体操作?? 你试试下面的代码:<input type=button value="刷新父窗口" onclick="opener.reload();"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你试试下面的代码:<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.php:<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 正则匹配html 如何截取文件名? PHP如何获得 Discuz! 7.2 的用户名 有了解MSN通讯协议的吗?~是在是搞不懂啊?! 问dom解析xml的中文编码问题 Ecshop的session机制 (求助,讨论)区分国内和国外访问的方法 如何读取文件的某部分代码? 能否介绍一下session的用法!!! 请大家帮忙推荐一个php留言板,up皆有分,推荐者另开帖子予以酬谢 我使用字符串变量时出现的问题? "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