开发者

Way to determine the visible size of the web page

Is there a way for knowing what size was the visible portion of a page?

Are there any services that provide this? I mean, not just screen resolution, but availab开发者_JAVA百科le browser area. When a user has a lot of browser toolbars the area left for the webpage gets reduced. On the other hand, using Chrome may maximize the available space.

Thanks


Using Javascript, you can get the Window.InnerHeight & .InnerWidth


You'll have to use Javascript or JQuery to do so.

Here is a similar (answered) question


I found another implementation on StackOverflow itself which used jQuery.

$(window.top).width()  
$(window.top).height()

P.S. Just don't forget the brackets as i always missed them.

Reference: https://stackoverflow.com/a/7008807

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜