推荐一个 提示框 框架 SweetAlert

   
   
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>无标题文档</title>
  5. </head>
  6.   <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
  7. <script src="dist\sweetalert-dev.js"></script>  
  8. <link rel="stylesheet" href="dist\sweetalert.css">
  9. <script>
  10. $(function (){
  11. $("#div1").click(function() { 
  12.    swal("这是一个信息提示框!"); 
  13.   
  14. });
  15. });
  16. </script>
  17. <body>
  18. <div id="div1">测试1</div>
  19. </body>
  20. </html>
详细 参数
swal({ 
    title: "您确定要删除吗?", 
    text: "您确定要删除这条数据?", 
    type: "warning", 
    showCancelButton: true, 
    closeOnConfirm: false, 
    confirmButtonText: "是的,我要删除", 
    confirmButtonColor: "#ec6c62" 
}
API
参数 描述 默认值
title 提示框标题 -
text 提示内容 -
type 提示类型,有:success(成功),error(错误),warning(警告),input(输入)。 -
showCancelButton 是否显示“取消”按钮。 -
animation 提示框弹出时的动画效果,如slide-from-top(从顶部滑下)等 -
html 是否支持html内容。 -
timer 设置自动关闭提示框时间(毫秒)。 -
showConfirmButton 是否显示确定按钮。 -
confirmButtonText 定义确定按钮文本内容。 -
imageUrl 定义弹出框中的图片地址。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

非著名架构师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值