1.引用bootstrap.js可以从官网下载/
2.引用bootbox.js可以从官网下载/
3.示例演示
a.简单的提示框 alert
bootbox.alert({ size: "small", message: “我是提示啊”, callback: function() { } });
b.带有确定和取消框的confirm
bootbox.confirm({size: "small",message: "您确定删除么?",callback: function (result) {//result is bool}});
c.带有输入框的prompt
bootbox.prompt({
size: "small",
title: "What is your name?",
callback: function(result){
/* result = String containing user input if OK clicked or null if Cancel clicked */
}
});
4.属性
size:大小,title:标题,callback:回调函数,message:提示消息
ps:详细可以查看bootbox文档/