1. DOM
WEB standards are currently a hot topic, but the following is a document. all [] that does not comply with the standards. DOM--DOCUMENT object model Document object model provides methods to access document objects. for example, if you want to change the background color of a table in a document, you can use document in javascript. all [] access this TABLE. But DOM is also different. Because of the competition between browser vendors, various browser vendors have developed their own private DOM and can only run correctly on their own browsers, document. all [] is the private DOM that can only run on IE. To understand DOM correctly, the DOM of IE4 is given.
2. Understand document. all []
Document. all [] is added to the object model of IE starting from IE4. Let's take a look at the Description of document. all:
Array of all HTML tags in the document. Collection of all elements contained by the object.
That is to say, document. all [] is an array variable consisting of all tags in the document, including all elements in the document Object (see example 1 ).
IE's document. all collection exposes all document elements. This array provides access to every element in the document.
Document. all [] This array can access all elements in the document.
Example 1 (this helps you understand what objects are in the document)
Xmlns = "http://www.w3.org/1999/xhtml">
Example Heading
This isParagraph. It is onlyParagraph.
Yet anotherParagraph.
This finalParagraphHasSpecial emphasis.