天天看點

得到模态視窗的傳回值

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="送出">   

繼續閱讀