JavaScript 弹出窗体

//弹出层
//父页面代码、打开弹窗
function ProDBDisp(link) {
    var url = _spPageContextInfo.webAbsoluteUrl + link;
    var options = {
        width: 1240,
        height: 760,
        showClose: true,
        url: url,
        dialogReturnValueCallback: formcallback
    };
    SP.UI.ModalDialog.showModalDialog(options);
}
//父页面回调函数
function formcallback(dialogResult, returnvalue) {
    if (dialogResult == "1") {
        window.location.href = window.location.href;
    }
}
//子页面代码、关闭弹窗
function closetaskform(flag, returnvalue) {
    window.parent.SP.UI.ModalDialog.commonModalDialogClose(flag, returnvalue);
}

转载于:https://www.cnblogs.com/ZhangJiXuan/p/10452491.html

你可能感兴趣的:(JavaScript 弹出窗体)