Javascript:alert (document.body.clientWidth); //Web page Visible area width (body)alert (document.body.clientHeight); //Web page Visible Area high (body)alert (document.body.offsetWidth); //Web page Visible area width (body), including border, margin, etc.alert (document.body.offsetHeight); //Web page Visible area width (body), including border, margin, etc.alert (document.body.scrollWidth); //page Body full text width, including non-visible area with scroll baralert (document.body.scrollHeight); //The full text of the Web page is high, including the unseen area with scroll barsalert (DOCUMENT.BODY.SCROLLTOP); //Top (scroll bar) of the page being rolled awayalert (document.body.scrollLeft); //Web page is rolled away left (scroll bar)alert (window.screentop); //Browser Distance Topalert (window.screenleft); //Browser Distance leftalert (window.screen.height); //High Screen resolutionalert (window.screen.width); //width of screen resolutionalert (window.screen.availHeight); //the screen can be high on the work areaalert (window.screen.availWidth); //the width of the work area available on the screenJqueryalert ($ (window). Height ()); //Browser Current window viewable area heightalert (document). Height ()); //the height of the browser's current window documentAlert ($ (document.body). Height ()); //the height of the body of the browser's current window documentAlert ($ (document.body). Outerheight (true));//Browser Current Window document body total height includes border padding marginAlert ($ (window). width ()); //Browser Current window viewable area widthalert (document). width ()); //Browser Current Window Document object widthAlert ($ (document.body). width ()); //Browser Current Window document body widthAlert ($ (document.body). Outerwidth (true));//Browser Current Window document body total width includes border padding margin
1<!DOCTYPE HTML>2<Scriptsrc= "Jquery-1.5.1.min.js"type= "Text/javascript"></Script>3<HTML>4<Head>5<title>Aaa</title>6</Head>7<Body>8<H1>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAA 9 AAAAAAAAAAAAAAAAAA</H1>Ten<P>Welcome to AAA</P> One<H1>Aaa</H1> A<H1>Aaa</H1> -<H1>Aaa</H1> -<H1>Aaa</H1> the<H1>Aaa</H1> -<H1>Aaa</H1> -<H1>Aaa</H1> -<H1>Aaa</H1> +<H1>Aaa</H1> -<H1>Aaa</H1> +<H1>Aaa</H1> A<H1>Aaa</H1> at<H1>Aaa</H1> -</Body> -</HTML> the<Scripttype= "Text/javascript"> -alert (document.body.clientWidth); inalert (document.body.clientHeight); -alert (document.body.offsetWidth); toalert (document.body.offsetHeight); + -alert (document.body.scrollWidth); thealert (document.body.scrollHeight); * $alert (DOCUMENT.BODY.SCROLLTOP);Panax Notoginsengalert (document.body.scrollLeft); -alert (window.screentop); thealert (window.screenleft); +alert (window.screen.height); Aalert (window.screen.width); thealert (window.screen.availHeight); +alert (window.screen.availWidth); - $ //alert (document). Height ()); $ //alert (document). width ()); - </Script>
Javascript, jquery get browser and screen various height widths