<input type=button value=打开 onclick="openwin()">
<input type=text name=txt1>
<script>
function openwin()
{
var ss="传递的值";
a=window.showModalDialog('1.htm',ss,'dialogWidth:200px,dialogHeight:200px');
txt1.value=a;
}
</script>
1.htm
<script>
var dd=window.dialogArguments;
txt2.value=dd;
function closewin()
{
window.returnValue="返回值";
window.close();
}
</script>
得到值为:<input type=text name=txt2>
<input type=button value=关闭并返回值 onclick="closewin()">