affiliate_link

Monday, October 6, 2008

Getting screen resolution of client machine

Sometimes it is required to display to webpage according to the screen resolution of the client computer. It can be done easily in javascript using screen object of the window object.

Javascript code snippet

var width = window.screen.width;

var height = window.screen.height;

No comments: