jq关闭子窗口并获取返回值

function openwin() {
    var empyno = $("#hdempyno").val();
    x = window.showModalDialog("AddPoList.aspx?id=" + empyno, window, 'dialogHeight:550px;dialogWidth:450px;center:1;help:0;status:0;');
    if (x != null) {
        setUserID(x.pono);
    }
    else {
        //alert("您尚未选择人员,请选择后点击关闭按钮!");
    }

}
function setUserID(x) {
    document.getElementById('txtproject').innerText = x;
}
function btnpono() {
    var pono = $(':radio[name="radiogroup1"]:checked').val();
    var obj = window.dialogArguments;
    obj.pono = pono;
    window.returnValue = obj;
    window.opener = null;
    window.open('','_self','');
    window.close();

 }

你可能感兴趣的:(JavaScript)