//对b界面选择值处理
<input type="button" id="btnclose" value="确认并关闭窗口" onclick="closewin()" />
function closewin() {
//把b界面的值传到a界面去
window.returnvalue = totalcount;
window.close();
}
//a界面需要选择值
function showunitdialog2(id) {
var rdm = math.random();
//打开b界面
var result = window.showmodaldialog("goodsstocketacke.aspx?id=" + id + "&t=" + rdm, "盘点明细", "dialogwidth=800px;dialogheight=500px;center=1");
//接受b界面的值
if (result) {
$("#txtrealcount").val(result);
$("#txtrealcount").attr("
readonly", "true");
$("#tbunit tr:eq(1) td:eq(3)").html(result);
initbutton();
}
}