jquery例子
var img = $(‘#imageid');
var theimage = new image();t
heimage.src = img.attr(“src”);
alert(“width: ” + theimage.width);
alert(“height: ” + theimage.height);
js例子
var img = new image();
img.onload = function(){
宽度=this.width
高度=this.height
}
img.src = 图片地址;