Common browser width and height and the width and height of the visible area

The width of the visible area of ​​the web page: document.body.clientWidth; the height of the visible area of ​​the web page: document.body.clientHeight; //The width of the visible area of ​​the body web page: document.body.offsetWidth + " (including the width of the border and scroll bar)"; the web page is visible Area height: document.body.offsetHeight + " (including the width of the border)"; the full text width of the web page body: document.body.scrollWidth; the full text height of the web page body: document.body.scrollHeight; //The height of the window web page is scrolled ( ff): document.body.scrollTop; The height of the web page being scrolled (ie): document.documentElement.scrollTop; The left side of the web page being scrolled: document.body.scrollLeft; On the body part of the web page: window.screenTop; The body part of the web page Left: window.screenLeft; Height of screen resolution: window.screen.height; Width of screen resolution: window.screen.width; Height of screen available workspace: window.screen.availHeight; Available workspace width of screen: window. screen.availWidth; your screen settings are: window.screen.colorDepth + "bit color"; your screen settings: window.screen.deviceXDPI + "pixels/inch";

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324823696&siteId=291194637