The composition of JavaScript--ecmascript, BOM, and Dom

Source: Internet
Author: User

JavaScript consists of three parts: ECMAScript, BOM, and Dom

1. Core--ecmascript: Provide core language functions

2. Document Object Model--dom: Provides methods and interfaces for accessing and manipulating Web page content

An application Programming interface (API) for XML but extended for HTML.

The DOM maps the page into a multi-layered node structure.

Why use the DOM? Netscape and Microsoft in the development of DHTML, in order to avoid the two separate, browser incompatible situation, to maintain the nature of Web cross-platform, Dom emerged.

DOM1 level: Consists of the DOM core and Dom html two parts. Dom core specifies how to map an XML-based document structure, and Dom HTML expands on the base of the DOM core, adding objects and methods for HTML.

DOM2 level: Based on the original DOM to expand the mouse and user interface events, scopes, traversal (method of iterating DOM document), and through the object interface to increase the support of the CSS, the DOM1 level of the DOM core has also been extended to support the XML namespace. Introduced a new module: Dom views--defines an interface for tracking different document views, Dom events--defines the interface for event and event handling, and Dom style--defines an interface that applies styles based on CSS for elements; DOM Traversal and range-- Defines the interfaces that traverse and manipulate the document tree.

DOM3 level: Introduces methods for loading and saving documents in a uniform way-defined in DOM load and save (DOM load and save) module, and new method for validating documents-defined in DOM validation (DOM Validation) module. The DOM core was extended to support the XML 1.0 specification, involving XML Infoset, XPath, and XML Base.

3. Browser Object Model--bom: Provides methods and interfaces for interacting with the browser

The BOM can access and manipulate the browser window and use the BOM to control parts of the page that the browser displays. HTML5 is committed to writing many BOM functions into formal specifications.

Fundamentally, the BOM only handles browser windows and frames, but it's customary to count all browser-specific JavaScript extensions as part of the BOM, including the ability to pop up new browser windows, move, zoom, and close the browser window, provide browser details for the Navigator object, A Location object that provides detailed information about the page loaded by the browser, a screen object that provides user display resolution details, and support for cookies, such as custom objects such as XMLHttpRequest and IE's activexobject.

BOM is composed of Navigator, history, screen, location, document five objects.

The composition of JavaScript--ecmascript, BOM, and Dom

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.