📅  最后修改于: 2022-03-11 15:02:21.790000             🧑  作者: Mango
$.get(url)
.done(function (responseText) {
// things to do when file is found and use below condition
// if only the server redirection is on
a = responseText
if (a.search("a sample string from response html") < 0) {
// thing to do when file is found and not redirected
} else {
// thing to do when file is not found and redirected
}
}).fail(function () { // Network error
});