天天看点

得到模态窗口的返回值

index.htm  

  ----------------------  

  <input   type="button"   id="test"   οnclick="window.showModalDialog('1.htm',window,'');"   value="点我">  

  ----------------------  

  1.htm  

  ----------------------  

  <script   language="javascript">  

  function   test()  

  {  

  window.dialogArguments.document.all["test"].value   =   document.all["txt_Value"].value;  

  window.close();  

  }  

  </script>  

  <input   id="txt_Value">  

  <input   type="button"   οnclick="test();"   value="提交">   

继续阅读