zoukankan      html  css  js  c++  java
  • jquery

    使用场景:

        使用swal进行确认,是否执行某件事之后,点击确定之后,弹出成功或者失败的弹框

       关键设置    closeOnConfirm:false

     swal({
            title: '确定要删除【'+name+'】模板吗?',
            text: '',
            type: 'warning',
            showCancelButton: true,
            confirmButtonColor: "#DD6B55", //可有可无
            confirmButtonText: "确定",   //可有可无
            closeOnConfirm: false    //必须设置为false
        }, function (isConfirm) {
            if(isConfirm){
                // swal.disableButtons();
                loadDataByAjax(url, params, function (data) {
                    if (data.status == 'success') {
                        swalsuccess();     //这里才能进行弹出
                        getDataOfCon();
                    }else{
                        swal('', data.status, 'warning');
                    };
                });
            }
            
        })

    点击确定之后,请求成功 

  • 相关阅读:
    centos7搭建nexus
    centos7搭建ftp
    tomcat笔记
    mysql跨服务器触发器
    IntelliJ IDEA笔记
    node.js笔记
    myeclipse笔记
    术语
    centos7安装mysql
    js跨域访问资源
  • 原文地址:https://www.cnblogs.com/fyjz/p/12922477.html
Copyright © 2011-2022 走看看