| 发表于:2007-05-13 18:09:124楼 得分:20 |
1.html <script type= "text/javascript "> function btnopen_click() { // document.mainform.txtvalue.value = window.open( "2.html ", null, "height=300,width=300,status=no,toolbar=no,menubar=no,location=no "); document.mainform.txtvalue.value = window.showmodaldialog( "2.html "); } </script> <form name = "mainform "> <input type = "button " value= "click " name = "btnopen " onclick= "btnopen_click(); " /> <input type = "text " name = "txtvalue " /> </form> 2.html <script type= "text/javascript "> function btnopen_click() { window.returnvalue = document.form1.txtvalue.value; alert (document.form1.txtvalue.value); window.close(); } </script> <form name = "form1 "> <input type = "button " value= "click " name = "btnopen " onclick= "btnopen_click(); " /> <input type = "text " name = "txtvalue " /> </form> | | |
|