SOURCE

//判断链接是否存在
function validateImage(pathImg) {
	var ImgObj = new Image();
	ImgObj.src = pathImg;
	if(ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) {
		return true;
	} else {
		return false;
	}
 
}
console 命令行工具 X clear

                    
>
console