直接上代码
var tmpImg = new Image();
tmpImg.src="https://www.google.com/intl/en_com/images/srpr/logo3w.png"; //or document.images[i].src;
$(tmpImg).one('load',function(){
orgWidth = tmpImg.width;
orgHeight = tmpImg.height;
alert(orgWidth+"x"+orgHeight);
});
网友评论