bootbox 使用方式
来源:互联网 发布:mac os sierra文件 编辑:程序博客网 时间:2024/06/06 18:19
文章URL:og.csdn.net/zh921112/article/details/41513161
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>bootbox自定义dialog、confirm、alert样式,基本全局设置方法setDefaults</title>
<link href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" />
<style>
.btn-myStyle{ background-color: #2c3e50; color:#fff}
.btn-myStyle:hover,.btn-myStyle:focus{color:#fff;text-decoration: none;}
</style>
</head>
<body>
<button id="test" class="btn btn-default">测试</button>
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="http://bootboxjs.com/bootbox.js"></script>
<script>
$(document).ready(function() {
//bootbox.setDefaults({
/**
* @optional String
* @default: en
* which locale settings to use to translate the three
* standard button labels: OK, CONFIRM, CANCEL
*/
//locale: "fr",
/**
* @optional Boolean
* @default: true
* whether the dialog should be shown immediately
*/
//show: true,
/**
* @optional Boolean
* @default: true
* whether the dialog should be have a backdrop or not
*/
//backdrop: true,
/**
* @optional Boolean
* @default: true
* show a close button
*/
//closeButton: true,
/**
* @optional Boolean
* @default: true
* animate the dialog in and out (not supported in < IE 10)
*/
//animate: true,
/**
* @optional String
* @default: null
* an additional class to apply to the dialog wrapper
*/
//className: "my-modal"
//});
});
$(document).on("click", "#test", function (e) {
bootbox.confirm("Hello world!", function (result) {
if(result) {
alert('点击了确认按钮');
} else {
alert('点击了取消按钮');
}
});
// bootbox.dialog({
// message: "I am a custom confirm",
// title: "Confirm title",
// buttons: {
// Cancel: {
// label: "Cancel",
// className: "btn-default",
// callback: function () {
// alert("Cancel");
// }
// }
// , OK: {
// label: "OK",
// className: "btn-primary",
// callback: function () {
// alert("OK");
// }
// }
// }
// });
// bootbox.confirm({
// buttons: {
// confirm: {
// label: '我是确认按钮',
// className: 'btn-myStyle'
// },
// cancel: {
// label: '我是取消按钮',
// className: 'btn-default'
// }
// },
// message: '提示信息',
// callback: function(result) {
// if(result) {
// alert('点击确认按钮了');
// } else {
// alert('点击取消按钮了');
// }
// },
// title: "bootbox confirm也可以添加标题哦",
// });
// bootbox.alert({
// buttons: {
// ok: {
// label: '我是ok按钮',
// className: 'btn-myStyle'
// }
// },
// message: '提示信息',
// callback: function() {
// alert('关闭了alert');
// },
// title: "bootbox alert也可以添加标题哦",
// });
});
</script>
</body>
</html>
- bootbox 使用方式
- bootbox
- Yii2使用Bootbox插件自定义弹窗
- 关于ace 里提示框插件bootbox的使用
- 关于ace 里提示框插件bootbox的使用
- bootbox 使用问题 backdrop无效,无法阻塞,默认获得focus
- bootbox居中
- bootbox中文
- 封装bootbox.js对话框
- 弹出对话框bootbox.confirm
- bootbox.confirm的用法
- 弹出框插件bootbox
- bootbox 动态生成导航列表
- bootbox.js官方文档中文版
- bootstrap bootbox 属性及用法
- 网页弹框插件bootbox
- bootstrap-datepicker时间插件和chosen.jquery下拉模糊搜索和bootbox.min弹出框以及jquery.tips提示框和js的全选与取消的使用
- bootstrap alert 插件 bootbox hello world
- 在水经注微图中如何复制已绘制对象
- 关于夺宝类项目,审核问题
- retrofit2上传文件总结
- jquery.cookie中的操作
- 算法之----欧拉回路,欧拉通路,半欧拉图
- bootbox 使用方式
- 关于UIView的autoresizingMask属性的研究
- Linux使用tcpdump命令抓包保存pcap文件wireshark分析
- C++数组
- 网络扫描工具NMAP的安装
- window.name实现页面跳转时数据传递
- 【Android SDK Manager】拒绝访问导致无法下载更新
- iOS剪切板 UIPasteboard
- 改Android Studio的Logcat缓冲区大小