📜  甜蜜警报添加自定义按钮 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:23.378000             🧑  作者: Mango

代码示例1
$(document).on('click', '.SwalBtn1', function() {
        //Some code 1
        console.log('Button 1');
        swal.clickConfirm();
    });
    $(document).on('click', '.SwalBtn2', function() {
        //Some code 2 
        console.log('Button 2');
        swal.clickConfirm();
    });

$('#ShowBtn').click(function(){
    swal({
        title: 'Title',
        html: "Some Text" +
            "
" + '' + '', showCancelButton: false, showConfirmButton: false }); });