DOM0, DOM1, DOM2, DOM3

Source: Internet
Author: User
Tags object model

----------------------excerpt from others ' Notes (http://itbilu.com/javascript/js/Vyxodm_1g.html), thanks for sharing----------------------

JavaScript has undergone a shift from being misunderstood to being a man of the limelight. With the introduction of some JavaScript programming specifications (such as: AMD, CMD), its application range from the front-end some small functions gradually extended to the back end and some large projects. So, what does JavaScript add to the functionality that JavaScript has to gain from confusion to the processes that the rigorous specification goes through?


1. The origins of JavaScript 1.1 The birth and development of JavaScript

JavaScript was originally designed by Netscape's Brendan Eich, and Netscape initially named LiveScript in its scripting language, and Netscape later renamed it JavaScript after working with Sun. From this point of view, JavaScript is only for marketing considerations, looks like Java actually and Java has no relationship.

Before JavaScript appeared, web browsers were just software that displayed hypertext documents, and the interactivity of the Web page improved significantly after JavaScript, and its content was no longer limited to simple text. The first version of JavaScript, JavaScript 1.0, was launched in the 1995 Netscape Navigator 2 browser.

Netscape Navigator Browser also dominates when JavaScript 1.0 is released. Microsoft published VBScript in IE 3.0 named JScript. In the face of Microsoft's competition, Netscape standardized the JavaScript language with Sun United ECMA (The European Computer Manufacturing Association), namely: ECMA-262 (ECMAScript), the JavaScript language standard we use today, The latest standard is ECMAScript 6.


The design features of 1.2 JavaScript

JavaScript was originally designed as a scripting language for non-program people, JavaScript as an interpreted scripting language, often relying only on web browsers to do some operations and not run as independently as a dynamic language. It is also because of the simplicity of JavaScript that makes it easier to learn and use.

JavaScript provides users with an API to manipulate Web browsers and Web documents: the BOM (Browser object model) and the DOM (Document Object model). You can adjust the width, height, and location of your browsing through JavaScript, and you can adjust the display, hiding, form submission, etc. of Web page content through JavaScript.


2. The birth and development of Dom 2.1 dom is what

DOM, Document Object model. DOM is the standard for the World Wide Web Consortium, which defines the criteria for accessing HTML and XML documents. In the standard of the consortium, Dom is a platform-and language-independent interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document.

The consortium DOM consists of the following three parts: the core DOM-Standard Model XML DOM for any structured document-Standard Model HTML DOM for XML documents-Standard Model for HTML documents


The difference of the development-dom0, DOM1, DOM2 and DOM3 of 2.2 dom

DOM0

JavaScript provides the content APIs for querying and manipulating Web documents (such as images and forms) in earlier versions, defining ' images ', ' forms ' in JavaScript, and so we can access the first picture or "user" like this: The form:

Document.images[0]
document.forms[' user '

This is actually an early-stage DOM that does not form the standard experimental properties, and is now customarily called DOM0, namely: Level NO. 0 dom. Since the DOM0 was in the early stages of an incipient standard before the launch of the Consortium, Netscape and Microsoft each launched their own fourth-generation browsers, starting with various issues from the DOM.

DOM0 and DHTML

Netscape Navigator 4 and IE4 were released in June and October, respectively, in 1997, both of which greatly expanded the DOM, making JavaScript more functional, and a term that began to appear: DHTML.

DHTML is the short name of Dynamic HTML (animated HTML). DHTML is not a new technology, but a description of the combination of HTML, CSS, and JavaScript technology. That is: Using HTML to mark a page as a variety of elements using CSS to set the element style and its display position use JavaScript to manipulate page elements and styles

With DHTML, it seems easy to control page elements and implement an inherently complex effect such as animating by changing the position of an element. But this is not the case, because there are no specifications and standards, the two browsers on the same functionality is completely different. To keep the program compatible, the programmer must write some probing code to detect which browser JavaScript is running under and provide the corresponding script. JavaScript has fallen into unprecedented chaos, and DHTML has left a bad impression on people's minds.

The appearance of DOM1

At the same time as browser vendors to the browser station, the company launched a standardized DOM in conjunction with everyone's advantages, and completed the first level DOM in October 1998, namely: DOM1. The consortium defines the DOM as a platform-and programming-language-independent interface through which the interface programs and scripts can dynamically access and modify the content, structure, and style of the document.

The DOM1 level primarily defines the underlying structure of HTML and XML documents. In DOM1, the DOM consists of two modules: the DOM core (the DOM kernel) and the DOM HTML. Among them, the DOM core provides an xml-based document structure standard that simplifies access and manipulation of any part of the document. Dom HTML expands on the DOM's core, adding objects and methods for HTML, such as the Document object in JavaScript

DOM2 and DOM3 introduced more interaction capabilities DOM2 and DOM3 on a DOM1 basis, and also supported more advanced XML features. DOM2 and DOM3 divide the DOM into more connected modules. DOM2 level in the original DOM on the basis of the expansion of the mouse, user interface events, scope, traversal and other subdivision modules, and through the object interface to increase the support of the CSS. The DOM core modules in the DOM1 level have also been extended to support XML namespaces. The following modules are introduced in the DOM2 module, which contains a number of new types and interfaces: Dom View (DOM views): An Interface DOM event (DOM events) that defines the tracking of different document views: interface Dom styles that define event and event handling (DOM Style): Defines the interface DOM traversal and range (DOM traversal and range) that is based on CSS for the element application style: Defines the interface for traversing and manipulating the document tree

DOM3 further expands the DOM and introduces the following modules in DOM3: Dom load and save modules (DOM load and Saving): A method for loading and saving documents in a unified way DOM validation module (DOM Validation): A method for validating a document is defined Dom Core extensions (DOM Style): Supports the XML 1.0 specification, involving XML Infoset, XPath, and XML Base

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.