4. The composition of JavaScript

Source: Internet
Author: User

JavaScript is a scripting language based on the ECMAScript specification, and it's built on its own encapsulation. It is worth saying that ECMAScript is not a programming language, it is just a scripting language specification developed and published by the European Computer Association.

In addition to JavaScript, ActionScript (Flash), JScript (Microsoft) are based on the ECMAScript specification.

First, let's look at the composition of javascript:

    • ECMAScript (CORE): The basis of JavaScript
    • DOM (Document Object model): Document objects module, which specifies an interface for accessing HTML and XML
    • BOM (Browser object model): Browser object models, which provide objects and methods that are independent of content and exchanged between browser windows

1. ECMAScript

ECMAScript the core syntax for JavaScript, which includes basic data types, reserved words, keywords, operators, objects, and so forth. He doesn't belong to any browser.

2. DOM

The DOM is the abbreviation for "Document Object Model", which is the documentation object models, which are customized by the audience.

The DOM defines an interface for manipulating HTML documents, providing access to HTML documents and how to do so.

After the browser loads the HTML document, it plans the entire document into a node tree that is composed of nodes.

1 <div class= "id" id= "class" >dom (Document Object Model) </div>

3. BOM

The BOM is the abbreviation for the "Browser object Model", which is the browser object models. Unfortunately, the BOM is only a ECMAScript expansion, and there is no relevant norms, the Internet has not made the corresponding specifications, each browser manufacturer has a set of its own BOM standards.

The BOM defines the interface of the operating browser, providing access to certain functions (e.g. browser window size, browsing history, etc.) and how to do so.

Main functions of BOM:

    1. Pop up a new browser window
    2. Move, close, and resize the browser window
    3. Navigation objects for Web browser details
    4. Local object that the browser loads the page details into
    5. Screen object for user resolution details
    6. Support Cookies
    7. IE has extended the ActiveX object class to the BOM, and can implement the ActiveX object through JavaScript.

4. The composition of JavaScript

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.