IE 7 jQuery图像加载错误

IE 7 jQuery图像加载错误,jquery,image,internet-explorer-7,load,Jquery,Image,Internet Explorer 7,Load,我正在将一个图像加载到一个空白标记中,并不断出现以下IE 7错误:reader.load->加载图像时出错: 我正在运行jQuery 1.7.1和以下程序来加载映像: prop.image.attr('src', 'http://localhost/uploads/239-4/SCAN_0001.jpg').load(function(e) { if (!this.complete || typeof this.naturalWidth == "undefined" || this.natura

我正在将一个图像加载到一个空白标记中,并不断出现以下IE 7错误:reader.load->加载图像时出错:

我正在运行jQuery 1.7.1和以下程序来加载映像:

prop.image.attr('src', 'http://localhost/uploads/239-4/SCAN_0001.jpg').load(function(e) {
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
    alert('foobar x.x');
}
else { alert('image loaded yay \o/'); } });

解决方案是删除this.complete、typeof this.naturalWidth和this.naturalWidth的条件检查。这有点糟糕,因为如果图像没有加载,我们希望有某种回退

prop.image.attr('src', 'http://localhost/uploads/239-4/SCAN_0001.jpg').load(function(e) { alert('image loaded yay \o/'); });