IE8中的img.onload调整大小问题

时间:2011-07-18 20:13:00

标签: javascript html css

我正在调整我的图像大小以适应70x100的盒子。这在一切都很好,但IE。在IE中,图像保持原始大小。

var div = V.f.make({'DIV': {'className': 'imgContainer'}});
var img = V.f.make({'IMG':{'className':'hidden'}});
img.onload = function() {
 V.f.imgResize({
    'img': this, 
    'targetHeight': 70, 
    'targetWidth': 100,
    'styleSize': true,
    'styleMargin': true
});
var id = this.parentNode.parentNode.id;
$.v.products[id].h = this.height;
$.v.products[id].w = this.width;
this.className = '';

};

0 个答案:

没有答案
相关问题