js中判断图片存不存在
function checkImage(path){
var img = $(“<img src=’”+path+”’>”);
if(img[0].height > 0 && img[0].weight > 0){
return true;
}else{
return false;
}
}
function checkImage(path){
var img = $(“<img src=’”+path+”’>”);
if(img[0].height > 0 && img[0].weight > 0){
return true;
}else{
return false;
}
}