function getSize() { var w = document.documentElement.clientWidth; var h = document.documentElement.clientHeight; // put the result into a h1 tag document.getElementById('wh').innerHTML = "

Width: " + w + " • Height: " + h + "

"; }