Answers for "change image width and height javascript"

1

javascript get image width and height

var img = new Image();
img.onload = function() {
  alert(this.width + 'x' + this.height);
}
img.src = 'http://www.google.com/intl/en_ALL/images/logo.gif';
Posted by: Guest on March-04-2020
1

how to change size of image js

var image = document.getElementById('id');
image.style.width='imgWidth';
image.style.height='imgHeight';
Posted by: Guest on October-07-2020

Code answers related to "change image width and height javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language