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
精彩评论