JavaScript Window Object

Source: Internet
Author: User

1. The Location property of the Window object refers to the place object, which represents the URL of the document currently displayed in the window, and defines a method for loading the window into the new document. The href attribute of the Location object is a string that contains the full version of the URL.

The Assign () method of the Location object allows the window to load and display the specified URL document, and a similar replace () method removes the current document from the browsing history before loading the new document.

2. The History property of the Window object refers to the history object of the Windows. The history object is used to represent the window's browsing histories in the form of documents and document status lists.

3. The Navigator property of the Window object refers to the Navigator object that contains the browser manufacturer and version information.

4. The Window object's Screen property refers to screen formation, providing information about the size of the display and the number of colors available.

5. Window provides 3 ways to display a simple dialog box to the user.

(1) alert () displays a message to the user and waits for the user to close the dialog box.

(2) Confirm () displays a message asking the user to click the OK or Cancel button and return a bool value.

(3) prompt () waits for the user to enter a string and returns the string.

where confirm () and prompt () are blocked, the window is "modal."

JavaScript Window Object

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.