if (isPass = = true) {
    //
    $.ajax({
        type:"post",
        url :"/user/register",
        data:$("form").serialize(),
        dataType:"json",
        success:function(data){
            alert(data);
            if(data == "success"){
                alert("");
                window.location.href="/";//
            }else if(data == "fail"){
                alert(":"+data);
            }
        },
        error:function(){
            //window.location.href="/111";
            alert("");
            return false;
        }
    });
    alert("1");
    return true;
}
after executing the code, why does the registration exception 1 dialog box pop up first, and then the registration exception dialog box
