[JavaScript] jquery获得图片的原始尺寸 →→→→→进入此内容的聊天室

来自 , 2019-06-05, 写在 JavaScript, 查看 110 次.
URL http://www.code666.cn/view/338635ee
  1. // Get on screen image
  2. var screenImage = $("#image");
  3.  
  4. // Create new offscreen image to test
  5. var theImage = new Image();
  6. theImage.src = screenImage.attr("src");
  7.  
  8. // Get accurate measurements from that.
  9. var imageWidth = theImage.width;
  10. var imageHeight = theImage.height;
  11. //javascript/4265

回复 "jquery获得图片的原始尺寸"

这儿你可以回复上面这条便签

captcha