window.showModalDialog返回多个参数的问题
来源:百度知道 编辑:UC知道 时间:2024/05/30 13:05:33
各位虾哥帮小弟一下:小弟想用window.showModalDialog打开一个窗口 然后返回多个参数 并把多个参数分别附给父窗口的多个text控件 我现在只能返回多个参数 但只能附给父窗口的某一个text控件
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;
aa.value=getv;
}
}
//-->
</SCRIPT>
</head>
<input type="text" name="b">
<input type="text" name="a">
eg.htm
<SCRIPT language="javascript">
<!--
function GetValue()
{
window.returnValue=TextName.value+","+aa.value;
window.close();
}
//-->
</SCRIPT>
</head>
<input name="Te
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;
aa.value=getv;
}
}
//-->
</SCRIPT>
</head>
<input type="text" name="b">
<input type="text" name="a">
eg.htm
<SCRIPT language="javascript">
<!--
function GetValue()
{
window.returnValue=TextName.value+","+aa.value;
window.close();
}
//-->
</SCRIPT>
</head>
<input name="Te
给你改了一下:
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"