a.html
---------------------------------------------------------------------------------
<script language="javascript">
  var retval;
  var a = "stefli";
  retval = window.showModalDialog('b.html',a,'dialogHeight:300px;dialogWidth:250px;dialogleft:200px;dialogtop:100px;help:no;status:no;scroll:no');
</script>b.html
---------------------------------------------------------------------------------
<script language="javascript">
   alert(window.dialogArguments);   //这里接收
</script>
说明:
--------------------------------------------------------------------------------dialogArguments Property  Internet Development Index --------------------------------------------------------------------------------Retrieves the variable or array of variables passed into the modal dialog window. Syntax[ vVariables = ] window.dialogArguments

解决方案 »

  1.   

    if (window.dialogArguments != null)
    {
        var B = window.dialogArguments; //得到主页面里传递过来参数
        alert(B);
    }
      

  2.   

    vArguments Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of the window object.
      

  3.   

    在B窗口中用 window.dialogArguments 讀取,可以傳任何類型的值
      

  4.   

    http://dev.csdn.net/develop/article/15/15113.shtm
      

  5.   

    var obj=new Object();
    obj.name="";
    obj.age="";
    window.showModalDialog("",obj,"");
    接收页面