Les tailles dans le DOM

const box = document.querySelector('.myDiv');
let width = box.offsetWidth;
let height = box.offsetHeight;Last updated

const box = document.querySelector('.myDiv');
let width = box.offsetWidth;
let height = box.offsetHeight;Last updated
let w = window.innerWidth;
let h = window.innerHeight;
console.log("Width: " + w + "- Height: " + h);window.scrollBy(100, 100);
alert(window.scrollX + window.scrollY);