早上好,送你清新的问候,温馨的祝福,清晨,美好的开始,祝你今天精神棒棒,活力多多,心情好好,一切都好!
bootstrap3-dialog-master是一款高效,灵活的模态框,此处为基本知识!
1、源码地址
https://github.com/nakupanda/bootstrap3-dialog
2、效果展示
3、示例代码
所需引入的js和css
<link rel="stylesheet" type="text/css" rel="nofollow noopener noreferrer" href="css/bootstrap-dialog.css" rel="external nofollow" >
<link rel="stylesheet" type="text/css" rel="nofollow noopener noreferrer" href="css/bootstrap.css" rel="external nofollow" >
<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/bootstrap-dialog.js"></script>
初始化
<button type="button" id="tm" class="btn btn-primary" style="margin: 100px;"> <span class="glyphicon glyphicon-remove" aria-hidden="true"> </span>点我</button>
js实现代码
<script >
$(function(){
$('#tm').on('click',function(){
BootstrapDialog.show({
type : BootstrapDialog.TYPE_DANGER,
message: '你确定要删除吗?',
size : BootstrapDialog.SIZE_NORMAL,
buttons: [{
label: '确定',
action: function(dialog) {
dialog.close();
}
}, {
label: '取消',
action: function(dialog) {
dialog.close();
}
}]
});
})
})
</script>
本文bootstrap3-dialog-master模态框使用详解到此结束。无非就是把自己的心封锁起来,从此不让它跳动。小编再次感谢大家对我们的支持!