一、子頁面是父頁面透過window.open彈出的情況子頁面要向父頁傳值,只要在document前面加window.opener即可。 如: 1.父頁碼: 無標題文件title>head><BR>function tanchu()<BR>{<BR>{ .open("Untitled-5.html"); <BR>}<BR>script><BR><body><BR> <form id="form1" name="form1" method="post" action=" "><BR> <label> <input type="submit" name="button" id="button" value="提交"<BR> <input type="text" name="textfield" id="textfield" /><BR> label><BR> form><BR><BR><BR>2.子頁代碼:<BR> <html xmlns="http://www.w3.org/1999/xhtml"><P><head><BR><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><BR><title>無標題文件title><BR>head><BR><script language="javascript"><BR>function aaa()<BR>{<BR>{<BR> window .opener.document.getElementByIdx('textfield').value='123123123';<BR>}<BR>script><BR><body><BR> <form id="form1" name="form1" method= "post" action=""><BR> <label> <input type="submit" name="button" id="button" value="提交"<BR> > Sharp要向父頁面傳值,只要在document前面加parent即可。 <BR>1.父頁碼:<BR> <BR><html xmlns="http://www.w3.org/1999/xhtml"><BR><head><BR><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><STRONG><title>無標題文件title>head><br><body><br> <form id="form1" name="form1" method="post" action=""><BR> <label> <input type="text" name="textfield" id="textfield" /> label><帶> 3.html">iframe><P> form><BR>