根据img的url 判断img的图片大小

// 图片地址 后面加时间戳是为了避免缓存
var img_url = 'http://www.qttc.net/static/upload/2013/13643608813441.jpg?'+Date.parse(new Date());
// 创建对象
var img = new Image();
// 改变图片的src
img.src = img_url;
// 加载完成执行
img.onload = function(){
// 打印
alert(''+img.width+',height:'+img.height);
};

  

https://www.tongbiao.xyz/
原文地址:https://www.cnblogs.com/tongbiao/p/9339798.html