views:

61

answers:

1

alt text

how to get windowWidth, windowHeight, pageWidth, pageHeight, screenWidth, screenHeight, pageX, pageY, screenX, screenY in IE/FireFox/Chrome/Opera? or jquery, GWT? as showed in picture above!

thanks!

+3  A: 

If you are using jquery,you can get the size of the window or the document using jquery functions:

$(window).height();   // returns height of browser viewport
$(document).height(); // returns height of HTML document
$(window).width();   // returns height of browser viewport
$(document).width(); // returns height of HTML document

for screen size you can use screen object in the following way:

screen.height;
screen.width;
anand
thanks, and is there any way to get pageX, pageY, screenX, screenY?