您不必将图像插入DOM以获取其尺寸:
$("") .attr("src", "http://www.google.com/intl/en_ALL/images/logo.gif") .load(function() { alert(this.width); alert(this.height); }) ;