0
Q:

how to set image width and height dynamically in javascript

document.addEventListener('DOMContentLoaded', function() {
  var image = document.getElementById("container");
  alert(`${image.width} x ${image.height}`);
}, false);
0

New to Communities?

Join the community