📌  相关文章
📜  使用 jquery 在服务器上获取文件 - Javascript 代码示例

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

代码示例1
$.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
});