父窗口代码
var src="多选框选中的值";
window.showModalDialog('1.html',src,'dialogWidth:200px;dialogHeight:200px;scroll:no;status:no;center:yes');
在子窗口取值
var aidnum = window.dialogArguments;
alert(aidnum);
var src="多选框选中的值";
window.showModalDialog('1.html',src,'dialogWidth:200px;dialogHeight:200px;scroll:no;status:no;center:yes');
在子窗口取值
var aidnum = window.dialogArguments;
alert(aidnum);
var sendValue="你要传的值";
var sendValue1="你要传的值";
var sendValue2="你要传的值";
oWindow = new Object();
oWindow.aa = sendValue;
oWindow.bb = sendValue1;
oWindow.cc = sendValue2;
var wWin=window.showModalDialog(*.html,oWindow,"dialogWidth:800px;scroll:no;dialogHeight:600px;status:0;help:0;ed
ge:raised");在子窗口取值:
var getValue = window.dialogArguments;
alert("得到父窗口的值:"+getValue[0]);
alert(";"+getValue[1]);
alert(";"+getValue[2]);
<body>
<input type="checkbox" name="C1" value="ON" onclick="alert(this.checked)">
<input type="button" value="按钮" name="B3" onclick="window.open('子窗口取得父窗口的值2.htm','','');">
</body>弹出窗口
<script language="javascript">
alert(opener.document.all.C1.value);
</script>
<body>
</body>