code:
var w = document.documentElement.clientWidth
var h = document.documentElement.clientHeight
document.documentElement.clientWidth
Gets the width of the document display area of the browser window, excluding scroll bars.
document.documentElement.clientHeight
Gets the height of the document display area of the browser window, excluding scroll bars.