-1

不显示警报,重定向也不起作用

        //sweetalert2
        swal({
            title: "Success!",
            text: "Agent Created Successfully.",
            type: "success",
        }.then(function(){
            alert('here');
            window.location.href = "example.html";
        }));
4

1 回答 1

2

看起来你的paren放错了位置:

    //sweetalert2
    swal({
        title: "Success!",
        text: "Agent Created Successfully.",
        type: "success",
    }).then(function(){
        alert('here');
        window.location.href = "example.html";
    });
于 2017-10-24T14:26:11.277 回答