📜  获取 html 照片的宽度 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:42.599000             🧑  作者: Mango

代码示例1
var img = new Image();

img.onload = function(){
  var height = img.height;
  var width = img.width;

  // code here to use the dimensions
}

img.src = url;