A.html
<html> <head> <title> 메인 페이지 </title> <script language = "javaScript"type = "text/javaScript"> function OpenNew () {var im = new idandMethod (); im.id = document.getElementById ( "txtid"). 값; Window.showmodaldialog ( "ddd.html", im, ""); } function idandmethod () {this.id = "ddd"; this.method = settxt; } function settxt (str) {document.getElementById ( "txtID"). value = str; }. /> <br/> <input type = "button"value = "새 창을 열기B.html
<html> <head> <title> 메인 페이지 </title> <script language = "javaScript"type = "text/javaScript"> var IM; 함수 load () {im = window.dialogarguments; if (im.id == "xxx! id id id id ice id ice id ice id ice id ice id ice id ice id ice id here") document.getElementById ( "txtId1"). value = "어떤 식 으로든 입력 하시겠습니까!"; else document.getElementById ( "txtId1"). value = im.id; } function set () {im.method (document.getElementById ( "txtId1"). value); }.