alert("Your screen resolution is: " + screen.width + "x" + screen.height); code example
Example: get window resolution javascript
var clientWidth = document.documentElement.clientWidth;
$("h2").text(clientWidth);
var clientWidth = document.documentElement.clientWidth;
$("h2").text(clientWidth);