点击保存按钮后不能关闭弹出框
$(function(){
PopBoxHTML_init();
$(".btn").click(function(){
$("#pop1603041433").modal("toggle");
});
});
function PopBoxHTML_init(){
var html='';
html+= '<div class="modal" id="pop1603041433">';
html+=' <div class="modal-dialog">';
html+='<div class="modal-content">';
html+='<div class="modal-header">';
html+=' <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" onclick="popBoxCallBack({key:0})">×</span><span class="sr-only">Close</span></button>';
html+=' <h4 class="modal-title">模态弹出窗标题</h4>';
html+='</div>';
html+=' <div class="modal-body">';
html+='<p>模态弹出窗主体内容</p>';
html+='</div>';
html+='<div class="modal-footer">';
html+='<button type="button" class="btn btn-default" data-dismiss="modal" onclick="popBoxCallBack({key:0})">关闭</button>';
html+='<button type="button" class="btn btn-primary" onclick="popBoxCallBack({key:1})">保存</button>';
html+=' </div>';
html+=' </div>';
html+='</div>';
html+='</div>';
var popBox=$(html);
$('body').append(popBox);
}