Why does the local debug ajax prompt that this is json 404?

the version of jquery used is 3.3.1

$(function(){
    com.getData();
};

var com = {
    getData: function(){
        $.ajax({
            url: "../demo.json", //json 404
            type: "get",
            async:true,
            data: "",
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            success: function(data){
                com.getBootstrapTable(data);
            }
        });
    }
}

clipboard.png
404,

404

clipboard.png

Mar.31,2021

json file path paste to see


Big Brother, there is something wrong with your address. It is not because of jq, nor is it any other reason. It is your address.

this url
clipboard.png

clipboard.png

clipboard.png


since you say it's just an ordinary Http static server, rule out routing problems for the time being.
I always think that the real name of your demo.json file is demo.json , that is, write an extra space after it, you can check it.

Menu