Jquery从图像URL计算图像的宽度和高度

我试图使用 javascript和jquery从图像的地址/ URL找出图像的宽度和高度.

有谁知道我怎么做到这一点?提前致谢.

解决方法

要做到这一点,身体没有任何东西,请尝试以下方法

var imgurL = 'http://www.gravatar.com/avatar/f77ef279d6b33bc09ce5422049dd9e37?s=32&d=identicon&r=PG';
var img = $('<img src="'+imgurL+'"/>').load(function(){
    console.log(this.width + ' x ' + this.height);
});

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...