JavaScriptソース(メイン側) |
---|
<html> <head> <title>連絡書作成君Ver1.0</title> <script Language="JavaScript"><!-- subWin = window.open("sub.html","sub","width=300,height=200"); function setData() { txt = document.myFORM.test.value; subWin.document.myFORM.test.value = txt; return false; } // --></script> </head> <body> <form name="myFORM" onSubmit="return setData()"> <table border='1'> <tr height=30> <td> テキスト入力:</td> <td> <INPUT NAME="test" size=20> </td> </tr> </table> <input type="submit"> </form> </body> </html> |
JavaScriptソース(サブ側) |
---|
<html> <head> <title>SUBウインドウ</title> </head> <body> <form name="myFORM"> <div align="center"> <table border=1 cellspacing=0 cellpadding=3 width=300 height=30> <tr height=25> <td>ここに移動</td> <td ALIGN="center"> <input type="text"name="test" size=30> </td> </tr> </table> </div> </form> </body> </html> |