SweetAlert2实践代码
来源:互联网 发布:网络借贷办法 编辑:程序博客网 时间:2024/06/01 23:15
<script> $(function () { $('#a-del').click(function () { swal({ text: "确定要删除?", type: 'warning', showCancelButton: true, confirmButtonColor: '#ff0000', cancelButtonText: '取消', cancelButtonColor: '#4cd964', confirmButtonText: '删除', }).then(function (isConfirm) { if (isConfirm) { $.get({ url: '/CMS/delbook/', data: { val: $('#a-del').parent().prev().text() }, success: function (data) { if (data) { $('#a-del').parent().parent().remove(); } } }); swal({ text: "删除成功", type: 'success', showCancelButton: false, showConfirmButton: false } ); setTimeout(function () { window.location.href = 'http://127.0.0.1:8000/CMS/bkmgr.html'; }, 2000) } }, function (dismiss) { if (dismiss === 'cancel') { swal( '取消', '', 'error' ) } }) }) }) </script>
阅读全文
1 0
- SweetAlert2实践代码
- sweetalert2 IE兼容问题
- web前端插件SweetAlert2,可代替alert()
- sweetalert2 弹出窗提示前端框架
- Sweetalert2美观的提示框插件
- 亮眼的弹出框--SweetAlert2
- html之SweetAlert2使用方法集锦(一)
- ibatis 代码实践
- 代码 优化 指南 实践
- 代码审查最佳实践
- 代码审查最佳实践
- 代码审查最佳实践
- 代码审查最佳实践
- 代码审查最佳实践
- 代码审查最佳实践
- xpath实践代码总结
- 代码审查最佳实践
- 获取实践代码
- 1050. 螺旋矩阵(25)
- Qt学习------自定义拖放操作
- 注解方式实现声明式事务
- 《计算机操作系统》总结四(处理器调度)
- 链表的遍历
- SweetAlert2实践代码
- nginx location的配置
- Python安装
- 猜年龄
- spring执行同步任务和异步任务
- MariaDB Galera Cluster 部署(如何快速部署MariaDB集群)
- Map与 Object转换
- WGS84坐标系下大地坐标转换为空间直角坐标
- JSON.tringify(results)的前后比较