JavaScript DOM-7 Window Common sub-object (Navigator object, Location object, History object, Screen object)

Source: Internet
Author: User

First, navigator object


The role of Navigator objects

-The Navigator object contains information about the browser

-commonly used to obtain client browser and operating system information

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/59/wKioL1b9FGDyG31pAAA1_Vnc3iQ623.png "title=" Web.png "alt=" Wkiol1b9fgdyg31paaa1_vnc3iq623.png "/>


Common Properties and methods

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7E/5D/wKiom1b9FBzTtf_RAAD_QaSxWVo728.png "title=" Web.png "alt=" Wkiom1b9fbzttf_raad_qasxwvo728.png "/>


Ii. Location Object


The role of the Location object

-The Location object contains information about the current URL

-often used to get and change the URL of the current browser

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/59/wKioL1b9FRbTe0y1AABbvJtmcxw414.png "title=" Web.png "alt=" Wkiol1b9frbte0y1aabbvjtmcxw414.png "/>


Common Properties and methods

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/5D/wKiom1b9FLjRCY49AACbIhjpAVY881.png "title=" Web.png "alt=" Wkiom1b9fljrcy49aacbihjpavy881.png "/>650" this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/ 7e/5d/wkiom1b9fmrzxy09aaa-ndqckmk698.png "title=" Web.png "alt=" Wkiom1b9fmrzxy09aaa-ndqckmk698.png "/>


Third, the history of the object


The role of the History object

-The History object contains a historical record of the URLs visited by the user (in the browser window)

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/5D/wKiom1b9FR6x6aqPAABBvocefuk086.png "title=" Web.png "alt=" Wkiom1b9fr6x6aqpaabbvocefuk086.png "/>


Common Properties and methods

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/59/wKioL1b9Fd2xGjyyAAAdpIO1_LI522.png "title=" Web.png "alt=" Wkiol1b9fd2xgjyyaaadpio1_li522.png "/>650" this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/ 7e/5d/wkiom1b9fu6azbzmaabhwo24e7q036.png "title=" Web.png "alt=" Wkiom1b9fu6azbzmaabhwo24e7q036.png "/>


Four, Screen object


The role of the Screen object

-The Screen object contains information about the client display screens

-often used to get the screen resolution and color

-JavaScript programs will use this information to optimize their output to meet the required display requirements. For example, a program can choose to use a large image or a small image depending on the size of the display, and it can choose to use a 16-bit color or a 8-bit color based on the color depth of the display. In addition, the JavaScript program can also be based on information about the screen size of the new browser window positioning in the middle of the screen


Common Properties and methods

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7E/59/wKioL1b9FlnyAwsiAAEtjYAkNjo970.png "title=" Web.png "alt=" Wkiol1b9flnyawsiaaetjyaknjo970.png "/>



Summary: This chapter mainly introduces the JavaScript DOM window Common sub-object (Navigator object, Location object, History object, Screen object)

This article from the "Technical Exchange" blog, declined reprint!

JavaScript DOM-7 Window Common sub-object (Navigator object, Location object, History object, Screen object)

Related Article

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.