A.html
<html> <kopf> <titels> Hauptseite </title> <script Language = "javascript" type = "text/javaScript"> Funktion openNew () {var im = new idandMethod (); im.id = document.getElementById ("txtid"). Wert; window.showmodaldialog ("ddd.html", im, ""); } function idandMethod () {this.id = "ddd"; this.method = settxt; } function settxt (str) {document.getElementById ("txtid"). value = str; } </script> </head> <body> <form action = "#"> <input id = "txtid" type = "text" value = "xxx! Geben Sie die ID ein!" /> <br/> <Eingabe type = "button" value = "Neues Fenster öffnen" onclick = "openNew ()"/> </form> </body> </html>B.html
<html> <kopf> <titels> Hauptseite </title> <script Language = "javaScript" type = "text/javaScript"> var im; Funktion load () {im = window.dialogargumente; if (im.id == "xxx! ID hier eingeben") document.getElementById ("txtid1"). value = "Würden Sie es in irgendeiner Weise eingeben!"; sonst document.getElementById ("txtid1"). value = im.id; } function set () {im.Method (document.getElementById ("txtid1"). Wert); } </script> </head> <body onload = "load ()"> <form action = "#"> <input id = "txtid1" type = "text" value = "ddd"/> <br/> <Eingabe type = "button" value = "data" onclick = "set ()"/> </body> </body> </html>