JS Get screen Size

Source: Internet
Author: User

1, JS get screen size

functionA () {document.write ("Screen resolution:" +screen.width+ "*" +Screen.height+ "<br/>" + "screen available size:" +screen.availwidth+ "*" +Screen.availheight+ "<br/>" + "width of visible area of Web page:" +Document.body.clientWidth+ "<br/>" + "page visible Area High:" +Document.body.clientHeight+ "<br/>" + "width of the visible area of the Web page (including the width of the edge):" +Document.body.offsetWidth+ "<br/>" + "high visible area of Web page (including edge width):" +Document.body.offsetHeight+ "<br/>" + "page body full text width:" +Document.body.scrollWidth+ "<br/>" + "page body full text High:" +Document.body.scrollHeight+ "<br/>" + "page is rolled High:" +Document.body.scrollTop+ "<br/>" + "page is rolled away left:" +Document.body.scrollLeft+ "<br/>" + "Web page body part:" +Window.screentop+ "<br/>" + "page body part left:" +Window.screenleft+ "<br/>" + "high screen resolution:" +Window.screen.height+ "<br/>" + "width of screen resolution:" +Window.screen.width+ "<br/>" + "screen available work area height:" +Window.screen.availHeight+ "<br/>" + "screen available working area width:" +window.screen.availWidth);}</script><body onload= "A ()" ></body>

JS Get screen Size

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.