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>


版权声明:本文为sy9301原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。