window.open返回值

用window.showModalDialog()

  test1.htm
  ===================
  <script>
    var   a   =   window.showModalDialog( "test2.htm ")
    for(i=0;i <a.length;i++)   alert(a[i])
  </script>

  test2.htm
  ===================
  <script>
  function   sendTo()
  {
    var   a=new   Array( "a ", "b ")
    window.returnValue   =   a
    window.close()
  }
  </script>
  <body>
  <form>
    <input   value= "返回 "   type=button   οnclick= "sendTo() ">
  </form>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章