thule
0
Q:

get window resolution javascript

alert("Your screen resolution is: " + screen.width + "x" + screen.height)
3
var clientWidth = document.documentElement.clientWidth;
 $("h2").text(clientWidth);
1
var win = window,
    doc = document,
    docElem = doc.documentElement,
    body = doc.getElementsByTagName('body')[0],
    x = win.innerWidth || docElem.clientWidth || body.clientWidth,
    y = win.innerHeight|| docElem.clientHeight|| body.clientHeight;
alert(x + ' × ' + y);
2

New to Communities?

Join the community