天天看点

漂亮的提示框SweetAlert使用教程

  SweetAlert是一款不需要jQuery支持的原生js提示框,风格类似bootstrap。现在都已经升级到2.0

  它的提示框不仅美丽动人,并且允许自定义,支持设置提示框标题、提示类型、内容展示图片、确认取消按钮文本、点击后回调函数等。

  使用非常简单,示例如下

  

github地址:https://github.com/t4t5/sweetalert

官方文档: https://sweetalert.js.org/docs/

中文:

http://mishengqiang.com/sweetalert/

http://www.sucaihuo.com/jquery/12/1241/demo/

文档中没有浏览器兼容提示,只能自己测试了

github地址:https://github.com/limonte/sweetalert2

在线实例:https://limonte.github.io/sweetalert2 

中文:http://www.jq22.com/jquery-info8169

IE11*

Edge

Chrome

Firefox

Safari

Opera

Android Browser*

UC Browser*

漂亮的提示框SweetAlert使用教程
漂亮的提示框SweetAlert使用教程
漂亮的提示框SweetAlert使用教程
漂亮的提示框SweetAlert使用教程
漂亮的提示框SweetAlert使用教程
漂亮的提示框SweetAlert使用教程
漂亮的提示框SweetAlert使用教程
漂亮的提示框SweetAlert使用教程

SweetAlert2 不再支持ie10及以下版本

继续阅读