得到模態窗口的返回值

index.htm  
  ----------------------  
  <input   type="button"   id="test"   onclick="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"   onclick="test();"   value="提交">   
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章