JavaScript is a network of scripting language, has been widely used in Web application development, often used for Web pages to add a variety of dynamic features, to provide users with smoother and more beautiful browsing effect. JavaScript scripts are usually embedded in HTML to implement their own functions.
The three major components of JavaScript are:
1, the core of Ecmascript:javascript, describes the basic syntax of the language (Var, for, if, array, and so on) and data types (numbers, strings, Boolean, Functions, objects (obj, [], {}, NULL), undefined), ECMAScript is a set of criteria that defines what a language (such as JS) is like.
2. Document Object Model (DOM): the DOM (Document Object model) is an application interface (API) for HTML and XML. The DOM will plan the entire page as 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:
This code can be drawn into a hierarchy of nodes using the DOM:
The DOM represents the document by creating a tree, giving developers unprecedented control over the content and structure of the document. The DOM API makes it easy to delete, add, and Replace nodes (getElementById, ChildNodes, AppendChild, InnerHTML).
3, the Browser object model (BOM) accesses and operates on the browser window. For example, pop up a new browser window, move, change, and close the browser window, provide detailed web browser information (Navigator object), detailed page information (Location object), detailed user-screen resolution information (screens object), Support for cookies and so on. BOM as part of JavaScript does not have the relevant standards of support, each browser has its own implementation, although there are some non-standard standards, but still give developers a certain amount of trouble.