Home  >  Article  >  Web Front-end  >  What are the core components of javascript

What are the core components of javascript

青灯夜游
青灯夜游Original
2021-10-25 13:52:332680browse

The core components of JavaScript are: 1. ECMAScript, which provides the syntax and basic objects of the language; 2. DOM (Document Object Model), an application programming interface for XML but extended for HTML; 3. BOM (Browser Object Model).

What are the core components of javascript

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

The three core components of Java Script are: ECMAScript, DOM (Document Object Model), and BOM (Browser Object Model).

What are the core components of javascript

- ECMAScript


ECMA-262 has no reference to web browsers, Specifies the components of the language, including syntax, types, languages, keywords, reserved words, operators, and objects.

ECMAScript is a description of the language that specifies all aspects of the standard.

ECMAScript Compatible:

  • Supports all "types, values, objects, properties, functions, and program syntax and semantics" described by ECMA-262.

  • Supports Unicode character standards.

  • Add more "types, values, objects, properties, functions" that are not described in ECMA-262. The new features in West Zhejiang that ECMA-262 talks about mainly refer to this standard. New objects and new properties of objects not specified in .

  • Supports "Program and Regular Expression Syntax" not defined in ECMA-262. This means that the built-in regular expression syntax can be modified and extended.

-DOM (Document Object Model)


Document Object Model DOM is for XML but extended Application programming interface (API) for HTML. DOM maps the entire page into a multi-level node structure. Each component in an HTML or XML page is a node of some type, and these nodes contain different types of data.

In DOM, pages can generally be represented by a hierarchical node graph.

What are the core components of javascript

DOM level:

DOM level 1 became a W3C recommended standard in October 1998. BOM1 consists of two modules: DOM core and DOM HTML.

  • DOM core: Specifies how to map XML-based document structures to simplify access and manipulation of any part of the document.

  • DOM HTML: Extended on the basis of DOM core, adding objects and methods for HTML.

DOM2 level has expanded the mouse and user interface events, range, traversal and other subdivision modules on the basis of the original DOM, and added support for css through the object interface. Includes the following modules:

  • DOM Views: Defines an interface for tracking different document views.

  • DOM Events (DOM events): defines the interface for events and event processing.

  • DOM Traversal and Range (DOM traversal and range): Defines the interface for traversing and operating documents.

DOM3 level further expands the DOM and introduces the loading and saving module to load and save documents in a unified way; the new DOM verification module is mainly a method of verifying documents.

- BOM Browser Object Model


BOM handles browser windows and frames, and people are used to putting all browser-specific JavaScript extensions count as part of the BOM. Includes the following:

  • Function that pops up a new browser window.

  • The ability to move, zoom and close the browser window.

  • A navigator object that provides detailed information about the page loaded by the browser.

  • A location object that provides detailed information about the page loaded by the browser.

  • A screen object that provides user resolution details.

  • Support for cookies.

  • Custom objects like XMLHttpRequest and IE's ActionXobject.

[Recommended learning: javascript advanced tutorial]

The above is the detailed content of What are the core components of javascript. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn