javascript - Height and width of complete webpage -


i trying height , width of complete webpage regardless of viewport.

that is, if browser not maximized, need know complete size of webpage is.

methods have looked @ include document.body.clientwidth/clientheight, innerheight/width etc. change when browser made smaller.

please help! thanks!

--edit-- think have better idea of want. check out scrollheight , scrollwidth properties.

document.getelementbyid('width').innerhtml = document.body.scrollwidth;  document.getelementbyid('height').innerhtml = document.body.scrollheight;
scroll width is: <div id="width"></div>  scroll height is: <div id="height"></div>


check out properties screen object.

availheight , availwidth return screen height , width in pixels available window (excluding interface features such taskbar).

these values not change if resize window of browser. try out snippet below:

document.getelementbyid('width').innerhtml = screen.availwidth;  document.getelementbyid('height').innerhtml = screen.availheight;
width is: <div id="width"></div>  height is: <div id="height"></div>


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -