弹出框出现在本网页上,看起来不错,不管你使用台式电脑、手机或平板电脑。它甚至是高度可定制的,正如你可以看到下面! 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"); }); });