📅  最后修改于: 2022-03-11 14:47:50.397000             🧑  作者: Mango
var imageURLs = $('div');
imageURLs.each(function(index, element){
var imageURL = $(element).css('background-image').replace('url("', '').replace('")', '');
if (imageURL != "none"){
$.ajax({
url: imageURL,
type: 'HEAD',
error: function(){
//error handling for broken image url
}
});
}
});