SweetAlert自动将其自身置于页面上,看起来很棒,无论如何您正在使用台式机,移动或平板电脑。 它甚至高度可定制,如下图所示! http://t4t5.github.io/sweetalert/
一个基本的温馨信息
一个成功的消息!
一个警告信息,功能附加到“确认”按钮...
通过传递参数,您可以执行“取消”的其他操作。
您可以通过添加代码(示例来自警告按钮)轻松地在脚本中添加温馨警报。
$('.demo3').click(function () {
swal({
title: "Are you sure?",
text: "You will not be able to recover this imaginary file!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: false
}, function () {
swal("Deleted!", "Your imaginary file has been deleted.", "success");
});
});