Chapterii of JavaScript objects

Source: Internet
Author: User

First, BOM object

1.window Object--Represents the entire browser window

Common methods:

A) alert ()--System message box

Alert (' HelloWorld ');

b) Confirmation dialog box--confirm ()

Confirm ("OK to delete)

The method returns a Boolean value, and if clicked OK returns True, click Cancel to return false;

c) Input dialog box--prompt ()

Prompt ("Please enter your name?") ");

If you click OK to return the value in the text box as a function value, click Cancel to return null

d) Open a new Window--window.open ()

e) Timer--setinterval (), SetTimeout ()

Vart = Window.setinterval (); Setting the loop Timer

Window.clearinterval (T); Clear Loop Timer

Window.settimeout (); Set up a single time timer

Window.cleartimeout () Clear one-time timer

2.history Object--History object

Common methods:

1.back () Loads the previous URL in the History list.

2.forward () Loads the next URL in the history list.

3.go () loads a specific page in the History list.

3.Location objects

The Location object contains information about the current URL.

Property:

href--return the full URL

Common methods:

reload--Reload the current page

replace--new page Replace old page

4.navigator objects

The Navigator object contains information about the browser.

5.Screen objects

The Screen object contains information about the client display screens.

Chapterii of JavaScript objects

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.