<button type="button" id="MybtnPreventHTML" class="btn btn-primary" data-target="#MymodalPreventHTML" data-toggle="modal" data-backdrop="static" data-keyboard="false">Open Modal</button>
<!-- .modal -->
<div class="modal fade" id="MymodalPreventHTML">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Notification</h4>
</div>
<div class="modal-body">
Are you sure you want to continue?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Use Jquery
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$(document).ready(function(){
$('#MybtnModalPrevent').click(function(){
$('#MymodalPrevent').modal({
backdrop: 'static',
keyboard: false
});
});
});
|