window.showModalDialog返回多个参数的问题

a.htm:
<SCRIPT language="javascript">
<!--
function OpenWin()
{
var getv = showModalDialog("eg.htm", "egwin", "dialogWidth:420px; dialogHeight:220px;status:no;help:yes");
if (getv != null)
{
TextInfo.value=getv.split(",")[0];;
aa.value=getv.split(",")[1];;
}
}

//-->
</SCRIPT>
</head>
<input type="text" name="TextInfo">
<input type="text" name="aa">
<input type="button" name="Submit" value="打开" onClick="OpenWin()">



eg.htm:
<SCRIPT language="javascript">
<!--
function GetValue()
{
window.returnValue=TextName.value+","+aa.value;
window.close();
}

//-->
</SCRIPT>

<input name="TextName" type="text" id="TextName" value="因为有你而精彩">
<input name="aa" type="text" id="aa" value="MKLove">
<input type="button" name="Submit" value="关闭" onClick="GetValue()">
</p>
</div>
</body>
</html>

你可能感兴趣的:(window.showModalDialog返回多个参数的问题)