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
---------------------------------------------------------------------------------
<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
{
var B = window.dialogArguments; //得到主页面里传递过来参数
alert(B);
}
obj.name="";
obj.age="";
window.showModalDialog("",obj,"");
接收页面