Home > Web Front-end > JS Tutorial > body text

What are the components of JavaScript language?

藏色散人
Release: 2023-01-04 09:35:05
Original
2925 people have browsed it

The components of the JavaScript language are: 1. The ECMAScript part refers to the core of JavaScript, which describes the basic syntax and data types of the language; 2. The DOM part refers to the document object model; 3. The BOM part refers to the browser Object model.

What are the components of JavaScript language?

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

The three major components of JavaScript

JavaScript is a Network scripting languages ​​have been widely used in Web application development, and are often used to add various dynamic functions to web pages to provide users with smoother and more beautiful browsing effects. Usually JavaScript scripts realize their functions by embedding them in HTML.

The three major components of JavaScript are:

1. ECMAScript: The core of JavaScript, which describes the basic syntax of the language (var, for, if, array, etc.) and data types (numbers, String, Boolean, function, object (obj, [], {}, null), undefined), ECMAScript is a set of standards that defines what a language (such as JS) looks like.

2. Document Object Model (DOM): DOM (Document Object Model) is the application programming interface (API) of HTML and XML. DOM will plan the entire page into a document composed of node hierarchies. Each part of an HTML or XML page is a derivative of a node. Please consider the following HTML page:

<html>
  <head>
    <title>Sample Page</title>
  </head>
  <body>
    <p>hello world!</p>
  </body></html>
Copy after login

This code can be drawn into a node hierarchy diagram using DOM:
What are the components of JavaScript language?
DOM represents the document by creating a tree, allowing developers to Unparalleled control over content and structure. Nodes can be easily removed, added and replaced using the DOM API (getElementById, childNodes, appendChild, innerHTML).

3. The browser object model (BOM) accesses and operates the browser window. For example, popping up a new browser window, moving, changing and closing the browser window, providing detailed web browser information (navigator object), detailed page information (location object), detailed user screen resolution information (screen object) , support for cookies, etc. As a part of JavaScript, BOM does not have the support of relevant standards. Each browser has its own implementation. Although there are some non-de facto standards, it still brings certain troubles to developers.

[Recommended learning: javascript advanced tutorial]

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!