父页面
<script type="text/javascript">
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
function openView() {
var tableId = getUrlParam("TableID");
var result = window.showModalDialog(aaa.aspx?tableId=' + tableId, window, 'dialogHeight:500px;dialogWidth:420px;help:no;status:no;center:yes');//获取返回值
var aaa = document.getElementById("TextBox_TableOrderID");
aaa.value = result;
document.getElementById("Button_Check").click();
}
</script>
子页面
Response.Write("<script>window.returnValue='" + sb1.ToString() + "|" + sb2.ToString() + "'</script>");//传递返回值
Response.Write("<script>window.close();</script>");