bootstrap3-dialog-master模態(tài)框使用詳解
bootstrap3-dialog-master是一款高效,靈活的模態(tài)框,此處為基本知識!
1、源碼地址
https://github.com/nakupanda/bootstrap3-dialog
2、效果展示

3、示例代碼
所需引入的js和css
<link rel="stylesheet" type="text/css" href="css/bootstrap-dialog.css" rel="external nofollow" >
<link rel="stylesheet" type="text/css" 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實現(xiàn)代碼
<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>
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- 頁面遮罩層,并且阻止頁面body滾動。bootstrap模態(tài)框原理
- Bootstrap每天必學(xué)之模態(tài)框(Modal)插件
- Bootstrap模態(tài)框(modal)垂直居中的實例代碼
- 淺析BootStrap中Modal(模態(tài)框)使用心得
- bootstrap模態(tài)框消失問題的解決方法
- Bootstrap模態(tài)框禁用空白處點擊關(guān)閉
- BOOTSTRAP時間控件顯示在模態(tài)框下面的bug修復(fù)
- Bootstrap模態(tài)框調(diào)用功能實現(xiàn)方法
- Bootstrap BootstrapDialog使用詳解
- BootStrap+Angularjs+NgDialog實現(xiàn)模式對話框
相關(guān)文章
微信小程序防止多次點擊跳轉(zhuǎn)(函數(shù)節(jié)流)
這篇文章主要介紹了微信小程序防止多次點擊跳轉(zhuǎn)問題(函數(shù)節(jié)流),本文給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2019-09-09
Radio 單選JS動態(tài)添加的選項onchange事件無效的解決方法
radio 單選JS動態(tài)添加的選項,onchange事件無效。使用delegate()函數(shù)可以解決該問題,具體解決方案大家通過本文詳細了解下2016-12-12
JavaScript實現(xiàn)99乘法表及隔行變色實例代碼
最近做了個項目是要求實現(xiàn)99乘法表隔行變色,本文給大家分享通過多種方式實現(xiàn)js 99 乘法表,感興趣的朋友一起看看吧2016-02-02
通過event對象的fromElement屬性解決熱區(qū)設(shè)置主實體的一個bug
后臺的熱區(qū)管理中,如果鼠標(biāo)移到熱區(qū)上,會顯示一個提示框,提示框里“設(shè)為主實體”、“刪除”和“合并”等超鏈接,點擊這些超鏈接可以進行各種操作。2008-12-12

