你得用window.showModalDialog("2.htm")
给你个例子
test1.htm
===================
<script>
var a = window.showModalDialog("test2.htm")
for(i=0;i<a.length;i++) alert(a[i])
</script>
test2.htm
===================
<script>
function sendTo()
{
var a=new Array("a","b")
window.returnValue = a
window.close()
}
</script>
<body>
<form>
<input value="返回" type=button onclick="sendTo()">
</form>
给你个例子
test1.htm
===================
<script>
var a = window.showModalDialog("test2.htm")
for(i=0;i<a.length;i++) alert(a[i])
</script>
test2.htm
===================
<script>
function sendTo()
{
var a=new Array("a","b")
window.returnValue = a
window.close()
}
</script>
<body>
<form>
<input value="返回" type=button onclick="sendTo()">
</form>
<input type=text name=CustNO id= CustNO size=6>
在2.htm
<table>
<tr onclick="window.opener.document.getElementById('CustNO').value=this.cells[0].innerText"><td>a</td><td>b</td></tr>
<tr onclick ="....."><td>c</td><td>d</td></tr>
</table>