📜  ajax 错误获取输出 - Javascript 代码示例

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

代码示例1
$.ajax({
    type:     "post",
    data:     {id: 0},
    cache:    false,
    url:      "doIt.php",
    dataType: "text",
    error: function (request, error) {
        console.log(arguments);
        alert(" Can't do because: " + error);
    },
    success: function () {
        alert(" Done ! ");
    }
});