Rising Sun

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            148 隨筆 :: 0 文章 :: 22 評論 :: 0 Trackbacks

           第一頁1.htm
          <script>
           function OpenWin(form)
          {
             //showModelessDialog
             var  str = window.showModalDialog('2.htm',form,
                   'dialogWidth:300px; dialogHeight:201px; center:yes');
             if(str != null)
             document.forms[0].textb.vaule = str;
             }
          </script>
          <form name="form1" method="post" action="" onsubmit="return false" >
          <input type="text"  name="textb" />
          <input type = "submit" name = "submit" value = "打開新窗口" onclick= "OpenWin(this.form);" />

          </form>
          第二頁2.htm
          <title>Dialog</title>
          <script>
          function back()
          {
           window.dialogArguments.textb.value=document.form1.text1.value;
           self.close();
          }
          </script>
          <body>
          <form name="form1" method="post" action="#" onSubmit="back()" >
          <input type="text"  name="text1" />
          <input type = "submit" name = "submit" value = "返回" />
          </form>
          </body>

          1212.gif
          note :在第二頁要注意一點就是 當提交的時會打一個新的窗體,把action 設為“#”,就不會這個情況。

          posted on 2005-11-25 10:21 brock 閱讀(892) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 夏邑县| 乃东县| 安龙县| 大冶市| 万荣县| 东乡族自治县| 石林| 高邮市| 乐亭县| 濮阳县| 星座| 公主岭市| 宁夏| 武威市| 敦化市| 博兴县| 揭阳市| 安庆市| 三门峡市| 梧州市| 泉州市| 阿城市| 图片| 阳西县| 桐庐县| 科技| 西林县| 丰城市| 南开区| 景泰县| 彭泽县| 哈尔滨市| 砚山县| 金溪县| 南皮县| 惠东县| 巩留县| 宜丰县| 昌乐县| 宜昌市| 德阳市|