javascript--Browser object model BOM, text Object model DOM, JavaScript language Foundation ECMAScript

Source: Internet
Author: User

The contents of JavaScript contain the following three parts:

    1. ECMAScript (CORE): JavaScript Language Foundation;
    2. DOM (Document Object model): Provides access to HTML and XML interfaces;
    3. BOM (Browser object model): Provides objects and methods that are independent of the content and interact between browser windows.
I. ECMAScript

ECMASCRIPT Specifies the core syntax for JavaScript scripts, such as data types, keywords, reserved words, operators, objects, and statements, which do not belong to any browser.

The ECMAScript standard defines the most central content in JavaScript scripting, which is the "skeleton" of a JavaScript script that can be extended on top of it, such as the DOM (Document Object model) and the BOM (browser object model).

Currently, ECMAScript has released five versions, the latest version is V5, released in December 2009.

Two. DOM

The DOM is the abbreviation of "Document Object Model", abbreviated as "The file Objects models", which is developed by the publisher.

The DOM defines the interface for JavaScript to manipulate HTML documents, providing access to HTML documents (such as body, form, div, textarea, etc.) and how to do so.

Three. BOM
    • The BOM is an abbreviation for the browser object model.
    • BOM provides an object that is independent of the content and interacts with the browser window
    • Because the BOM is primarily used to manage the communication between Windows and Windows, its core object is window
    • A BOM is composed of a series of related objects, and each object provides many methods and properties
    • BOM lack of standard, JavaScript Grammar Standardization Organization is ECMA,DOM standardization Organization is the
    • The BOM was originally part of the Netscape browser standard

Unfortunately, the BOM is only an extension of ECMAScript, there is no relevant standards, the company has not made the specification of the section, each browser manufacturer has its own BOM implementation, which can be said to be the weakness of the BOM.

In the BOM tutorial, students will learn some objects that interact with the browser window, such as window objects that can be moved, resize the browser, and can be used to navigate the location object and the History object, to get the browser, Navigator and screen objects for operating system and user screens, you can use document as a portal to access HTML documents, frames objects for managing frames, etc.


Note: The BOM has some "de facto standards", such as manipulating the browser window, getting browser version information, etc., in different browsers, they are implemented the same way.

BOM structure diagram

The Window object is the top-level (core) object of the BOM, all of which are extended through it, or can be called a child of the window

Because window is the top-level object, you can call its child objects without displaying the indicated window object, for example, the following two lines of code are the same:

document.write("www.dreamdu.com");window.document.write("www.dreamdu.com");

javascript--Browser object model BOM, text Object model DOM, JavaScript language Foundation ECMAScript

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.