JavaScript Gets the screen width and height method:
Document.body.clientWidth;//width of visible area of Web pageDocument.body.clientHeight;//High Visibility area of Web pageDocument.body.offsetWidth;//width of the visible area of the page (including the width of the edge)Document.body.offsetHeight;//High Visibility area of the Web page (including high edges)Document.body.scrollWidth;//page Body Full text widthDocument.body.scrollHeight;//page body Full text highDocument.body.scrollTop;//The page is being rolled out of the highDocument.body.scrollLeft;//the page is rolled away to the leftWindow.screentop;//on the body part of the pageWindow.screenleft;//page body part leftWindow.screen.height;//High Screen resolutionWindow.screen.width;//width of screen resolutionWindow.screen.availHeight;//screen available work area heightWindow.screen.availWidth;//screen available work area width
jquery Gets the screen width and height method:
$ (window). Height ();//Browser Current window viewable area height$ (document). Height ();//the height of the browser's current window document$ (document.body). Height ();//the height of the body of the browser's current window document$ (document.body). Outerheight (true);//Browser Current Window document body total height includes border padding margin$ (window). width ();//Browser Current window viewable area width$ (document). width ();//Browser Current Window Document object width$ (document.body). width ();//Browser Current Window document body width$ (document.body). Outerwidth (true);//Browser Current Window document body total width includes border padding margin
Javascript, jquery get the width and height method of various screens