我正在尝试在将发布在内部办公室网站上的本地文件夹中查找pdf文件的最后修改日期。我的Last_Modified变量返回“ null”
是否可以将修改的日期添加到我创建的Last_Modified变量中?我其余的代码可用于解析文件名。
$.ajax({
//This will retrieve the contents of the folder if the folder is configured as 'browsable'
url: url_location,
success: function (data, textStatus, request) {
$(data).find("a:contains(.pdf)").each(function () {
var Last_Modified = request.getResponseHeader("Last-Modified");
var Link = this.href.split("/")[4];
Notice_Number = Link.split("_", 1);
var Category = Link.split("_", 2).slice(1)
var Subject = Link.split('_').slice(2).join(' ').replace(".pdf", "");
if (allcookies.indexOf(Notice_Number) != -1) {
//if cookie is set
Read_Status = "read";
} else {
Read_Status = "unread";
}
});
}
});