JavaScript Advanced Programming-Chapter One: Introduction to JavaScript

Source: Internet
Author: User

Introduction to JavaScript in the first chapter1. A brief history of JavaScript

Invented in 1995 by Netscape's Brendan Eich, JavaScript was originally designed to handle some input validation operations on the client, and since then became a feature of common browsers, and today's use is not limited to simple data validation, but ability to interact with almost any aspect of the browser window and its contents. JavaScript was then renamed to JavaScript for the media stir Java, which was originally named LiveScript.

After the great success of JavaScript, Microsoft also added a JavaScript implementation called JScript in its own browser, with two different JavaScript versions:Netscape JavaScript in navigator and JScript in Internet Explorer until 1997, The recommendations modelled on javascript1.1 were submitted to the European Association of Computer Manufacturers (Europe Computer Manufacturers Association) and the designation of Technical Committee No. 39th (tc39,technical Committee) is responsible for specifying:

Standardize the syntax and semantics of a common, cross-platform, vendor-neutral scripting language

The EC is thus developed MA-262 -- that is, the standard of the scripting language named ECMAScript.

The second year ISO/IEC also adopted ECMAScript as the standard, from then on, browser vendors began to work to ECMAScript as the basis of their respective JavaScript implementations .

2, ECMAScript realization

JavaScript means much more than ECMA-262, a complete JavaScript implementation should consist of the following three different parts

  1. Core (ECMAScript)
  2. Document Object Model
  3. Browser object Model (broswer)

2.1 ECMAScript

EcmascripT does not have a dependency on the Web browser , and the browser is just one of the possible hosting environments for the ECMAScript implementation, and the host environment provides an extension of that language so that the language interacts with the environment. The DOM uses the ECMAScript core type and syntax to provide more specific functionality to enable operations on the environment, as well as other environments, node, Adobe Flash.

This language does not contain the definition of input and output, ECMA-262 only defines the basis of the language, on which a more complete scripting language can be built.

  1. Grammar
  2. Type
  3. Statement
  4. Keywords
  5. Reserved words
  6. Operator
  7. Object

ECMAScript is a language description of all aspects of the implementation of this standard specification, and JavaScript implements the ECMAScript. Adobe Action also implements the ECMAScript.

2.2 Document Object Model (DOM)

The Document Object Model (DOM) is an application programming excuse (API) for XML but is extended for HTML, and theDOM maps the entire page into a multi-tiered node structure. Each component of a polygon in an HTML or XML page is a node of a type that contains the different types of data.

This tree diagram of the document, created by DOM, gives developers control over the content and structure of the page and is active, with the help of DOM-provided APIs that can easily delete, add, replace, or modify any node.

Early on, because IE and Netscape Navigator support different forms of DHTML (Dynamic HTML), they began to diverge, and finally the Internet was planning the Dom.

1998 DOM1 level became the standard of the world wide. The DOM1 level consists of two modules: the DOM core and the Dom HTML.

DOM1 level:

Dom Core: How to map an XML-based document structure to simplify access and manipulation of any part of the document.

Dom HTML: Expands on the DOM core, adding HTML objects and methods.

Ps:dom not only for JavaScript, but also for the DOM in other languages.

  The DOM2 class introduces a new module:

    Dom View: An interface that defines a view that tracks different documents (for example, documents before and after applying CSS).

DOM Event: Defines an excuse for event and event handling.

Dom Style: Defines an excuse for applying styles to elements based on CSS.

DOM Traversal and scope: Defines an excuse for traversing and manipulating the document tree.

    

  DOM3 further expands the DOM

Dom loading and saving: Introducing a unified way to load and save documents

Dom Validation: New methods for validating documents are added.

Dom Core extension: started to support the XML1.0 specification.

2.3 BOM Object Model

Both IE and Netscape Navigator support Browser object models (BOMs) that can access and manipulate browser windows, and the BOM is part of the Javascrip implementation until HTML5.

BOM only handles browser windows and frames, because there is no BOM standard, although there are de facto standards, such as the Window object and navigator object, but each browser has defined its own properties, with the HTML5, the implementation of the BOM is expected to be more compatible with the direction of development.

Summary:

  JavaScript is a script specifically designed to interact with Web pages, with three different parts:

  1. ECMAScript, defined by ECMA-262, provides core language functionality.
  2. The Document Object model, which provides a method interface for accessing and manipulating Web page content.
  3. The browser object model, which provides methods and interfaces for interacting with the browser.

JavaScript Advanced Programming-Chapter One: Introduction to JavaScript

Related Article

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.