真奇怪,opener象我这样用怎么就不行呢?我的用法排除其它内容是这样的:
第一个网页:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>
<a href="d2.htm" target="_blank">link</a> 
<form name="form1" method="post" action="">
  <input type="text" name="txt1">
</form>
</body>
</html>
第二个网页:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
function aa(){opener.document.form1.txt1.value="abcdefg";}</head><body>
<form name="form1" method="post" action="">
  <input type="button" name="Button" value="Button" onClick="aa()">
</form>
</body>
</html>
大意就是先第一个网页通过链接打开第二个网页,然后第二个网页用按钮调用含opener的函数来对第一个网页的文本框赋值。
调用后却显示错误,我该怎么做呢?应该这个问题不是很能够很难吧,帮帮忙好吗?