首页 > Web开发 > 详细

NET 弹出页面窗口选择返回值

时间:2016-02-07 23:22:18      阅读:207      评论:0      收藏:0      [点我收藏+]
在对话框要显示的页面中<head></head>标签内加入“ <base target="_self" /> ”。
处理回发弹出新页面的问题

主要功能描述:

在网页中 点击一个按钮 弹出一个页面窗口,选择弹出页面窗口的值,关闭窗口,界面得到值
复制代码 代码如下:

//对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();
}
}

NET 弹出页面窗口选择返回值

原文:http://www.jb51.net/article/48245.htm

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!