<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[url]http://www.w3.org/TR/html4/loose.dtd[/url]">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test.htm</title>
<script language="javascript">
function winopen(){
window.open("test1.htm");
}
</script>
</head>
<body>
<form name="form1" method="post" action="" >
<input type="submit" name="Submit" value="open" onClick="winopen()">
<input name="txtTest" type="text" id="txtTest" value="Test">
</form>
</body>
</html>
=========================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[url]http://www.w3.org/TR/html4/loose.dtd[/url]">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test1.htm</title>
<script language="javascript">
function change(){
var o=window.opener; //这里可以取得父页的对象的关键(打开者),其它的和操作以看的一样了
var txtt=o.document.forms[0].txtTest.value;
alert(txtt)
var txt=document.getElementById("text1");
if (o){
var otxt=o.document.getElementById("txtTest");
if(otxt){otxt.value=txt.value;}
}
}
</script>
</head>
<body>
<form name="form1" method="post" action="#" >
<input name="text1" type="text" id="text1">
<input name="Change" type="submit" id="Change" value="change" onClick="change()">
</form>
</body>
</html>