Answers for "image size with js"

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
1

javascript get image dimensions

var img = document.getElementById("myImageID"); 
var imgWidth = img.clientWidth;
var imgHeight = img.clientHeight;
Posted by: Guest on July-31-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language