首页 > 其他 > 详细

SweetAlert

时间:2019-02-15 21:00:42      阅读:209      评论:0      收藏:0      [点我收藏+]

官网地址

https://sweetalert.js.org/

CDN方式使用

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

下载到本地

https://unpkg.com/sweetalert@2.1.2/dist/sweetalert.min.js

swal({
  title: "Are you sure?",
  text: "Once deleted, you will not be able to recover this imaginary file!",
  icon: "warning",
  buttons: ["取消","确定"],
  dangerMode: true,
})
.then((willDelete) => {
  if (willDelete) {
    swal("Poof! Your imaginary file has been deleted!", {
      icon: "success",
    });
  } else {
    swal("Your imaginary file is safe!");
  }
});

 

SweetAlert

原文:https://www.cnblogs.com/wanglan/p/10385666.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!