无需ajax。您可以创建一个新的图像元素,设置其source属性,并在完成加载后将其放置在文档中的某个位置:
var img = $("<img />").attr('src', 'http://somedomain.com/image.jpg') .on('load', function() { if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { alert('broken image!'); } else { $("#something").append(img); } });


