The code is as follows: why does alert flash by instead of stopping? doesn't alert pause and wait for click confirmation before moving on?

 $.ajax({
            url: "../app/source/addPassenger",
            data: {
                passenger_resource: JSON.stringify(passenger_resource),
            },
            dataType: "json",
            type: "POST",
            success: function (data) {
                alert("")
                
                window.location.href = "select.html"

            },
            error: function () {
                alert("");
            }
        })
Mar.12,2021

I tried, alert stopped


maybe the confirmation box such as what you ordered before will not be prompted again causes the confirmation box not to pop up now


In theory, there will be no problem with

. Check to see if your window.alert function has been rewritten
such as

.
window.alert=function(msg){
  console.log(msg);
}
alert("alert");

your message is only seen in console

Menu