JS 前端彈出確認訊息 確定以及取消 分別執行 Swal , confirmButton

 Swal.fire({

    title: title,

    text: "是否確定覆蓋?",

    icon: "success",

    showCancelButton: true,

    confirmButtonText: "確定",

    cancelButtonText: "取消"

    //確定後執行

}).then((result) => {

    if (result.isConfirmed) {

        Swal.fire({

         title: title,

         text: "成功",

          icon: "success",

          button: "確定"

        });

    }

}).catch(() => {

         Swal.fire({

         title: title,

         text: "系統忙碌中",

          icon: "error",

          button: "確定"

        });

});


參考:

https://blog.csdn.net/qq_42970173/article/details/109121226

留言

這個網誌中的熱門文章

無法載入檔案或組件 'System.IO.Compression' 或其相依性的其中之一。

MongoDB 入門

javascript 更改屬性及創建標籤