弹窗控制

$("body").showPopup({
title: $.i18n.prop('保险单打印'),
content: url + "?json=" + jsons,
accept: function () {
window.doPrint(1, data); //预览
return false;
},
cancel: function () {
if ($("#default-tab-1").is(":visible")) {
window.doPrint(0, data); //打印
} else {
window.doPrint(0, data); //打印
}

},
atext: '<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> ' + $.i18n.prop('预览'),
ctext: '<span class="glyphicon glyphicon-print" aria-hidden="true"></span> ' + $.i18n.prop('打印'),
ccolor: '#59727D',
nocache: true,
newpop: 'new',
hiddenCloseBtn: false
});

原文地址:https://www.cnblogs.com/flymili1017/p/11121365.html