Object of JavaScript

Source: Internet
Author: User

BOM model; window (the core of the entire BOM): History, document, location.

BOM can be implemented 1. Pop up a new browser window 2. Move, close, and resize the window 3. Page forward, back

Common Properties: History (attribute name); Information about URLs visited by customers (description)

Location (zodiac name); Information about the current URL (description)

Window. Property value = "attribute value" (URL)

Common methods: Prompt () (method name); Displays a dialog box to prompt the user for input

Alert () (method name); Displays a warning box with a hint message and a OK button

Confirm () (method name); Displays a dialog box with a hint, OK, and Cancel button

Colse (); open (); SetTimeout () invokes the function or evaluates the expression after the specified number of milliseconds, and SetInterval () invokes the function or expression by the specified period (in milliseconds)

Common Events for Window objects

Name

Description

OnLoad

A page or an image is finished loading

onmouseover

Move mouse over an element

Onlick

The event handle that is invoked when the user clicks on an object

OnKeyDown

One of the keyboard keys is pressed

OnChange

The contents of the domain are changed

History Common Objects

Name

Description

Back ()

Load the previous URL in the History object list

Forward ()

Load the next URL in the History object list

Go ()

Load a specific URL in the History object list

Common methods for Document objects

getElementById ()

Returns a reference to the first object that owns the specified ID

Getelementsbyname ()

Returns the collection of objects with the specified name

getElementsByTagName ()

Returns the collection of objects with the specified label name

Write ()

Write text, HTML expressions, or JavaScript code to a document

Checked property value checked: True unchecked: false

Date Object var datetime object =new Date (parameter)

Parameter format: MM DD,YYYY,HH:MM:SS

Object of JavaScript

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.