l ECMAScript, defined by ECMA-262, clarifies the rules and conventions of the JavaScript language, such as the game rules, specifications, and conventions specified for starting a game.
l DOM: Provides methods and interfaces for accessing and operating web content
l BOM, provides methods and interfaces for interacting with browsers
ECMA-262 specifies the following:
l Syntax
l Type
l Keyword
l Reserved word
l Operator
l Object
ECMAScript is a programming language description of all aspects specified by the standard. JavaScript implements ECMAScript Content is specified and expanded upon.
BOM is used to access browser functions, including the following categories:
l Window object: (1) window relationship and frame; (2) window position; (3) window size ; (4) Navigation and opening windows; (5) Intermittent calls and scheduled calls; (6) System dialog box (7) Location object;
l Location object: Provides information about the document loaded in the current window ( 1) Query string parameters; (2) Position operations;
l Navigator object: used to detect the browser type that displays web pages; different browsers have different implementations; the main functions are divided into (1) detection plug-ins; (2 )Registration handler
l Screen object: Represents the capabilities of the client, including the height, width, etc. of the monitor displayed by the browser window.
l History object: Saves the user’s online history, which is an attribute of the window object; therefore each browser window, each window, and each frame has its own history object
DOM : Used to operate page tags, depicting html files as a structure constructed of multi-layer nodes, including the following content:
l Document type:
l Element type: Provides access to element tag names, sub-nodes and attributes.
l Text type: plain text content, can include escaped Html characters, but does not include html code
l Comment type: comments in Dom
l CDATASection type: only for xml documents
l DocumentType type
l DocumentFragment type
l Attr type: Represents the characteristics of the node
Event: The implementation of interaction between javascript and html, when some specific interactions occur in the document or browser window Moments are events. Its implementation uses the observer pattern, which supports loose coupling of page behavior and page appearance.
Events are divided into the following types:
l UI events
l Mouse events
l Keyboard events
l HTML events
l Change events: Triggered when the underlying Dom structure changes.