bootstrap 模态框model点击模态框外部不消失模态框的效果

由于客户使用是,填写模态框内容时,不小心点击了外部,有需要重新填写,因此需要限制点击外部不消失模态框,只能通过点击模态框的确定按钮或者右上角叉号,消失模态框。

只要在定义模态框时,添加上

data-backdrop="static"
属性即可。
如:
<div class="modal fade modal-aside horizontal right addOrUpdatePrivilege in" tabindex="-1" role="dialog"
     aria-labelledby="myLargeModalLabel" aria-hidden="true" id="PrivilegeWindow" data-backdrop="static">
//模态框的内容....

你可能感兴趣的:(bootstrap 模态框model点击模态框外部不消失模态框的效果)