bootstrap模态弹框
1,html("")里面需要加""(置空的时候)
2,这里是采用异步的方式,modal先出来(modal()),然后数据填充
<!--添加弹框-->
<div class="modal fade" id="riskModal" tabindex="-1" role="dialog" aria-labelledby="addriskLabel"
style="display: none;width: 80%;margin-left: -40%;height: 600px;">
<div class="modal-dialog" role="document" >
<div class="modal-content">
<ul id="myTab" class="nav nav-tabs">
<li class="active" data-id="tabApprovalHome"><a href="#approvalHome" data-toggle="tab">审批结果</a></li>
<li><a href="#cusInfo" data-id="tabCusInfo" data-toggle="tab">客户信息</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="approvalHome">
</div>
<div class="tab-pane fade" id="cusInfo">
</div>
</div>
<div class="modal-footer" style="height: 20%;">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
</div>
function alertUpdateWindows(data) {
// id = $("#detailApplyNo").val();
$("#approvalHome").html("");
$("#cusInfo").html("");
$("#detailApplyNo").val(data);
$.ajax({
type: "POST",
url: '/approvalPage/ruleResult/' + data,
cache : false, //禁用缓存
data: {},
dataType: "html",
contentType:'application/json; charset=utf-8',
success: function (data) {
$("#approvalHome").html(data);
}
});
id = $("#detailApplyNo").val();
$.ajax({
type: "POST",
url: '/approvalPage/ruleCusInfo/' + id,
cache : false, //禁用缓存
data: {},
dataType: "html",
contentType:'application/json; charset=utf-8',
success: function (data) {
$("#cusInfo").html(data);
}
});
$('#riskModal').modal();
}
上一篇: AES加密解密
下一篇: spring boot