The concept and role of DOM in JavaScript

Source: Internet
Author: User

1 <!DOCTYPE HTML>2 <HTMLLang= "en">3 <Head>4     <MetaCharSet= "UTF-8">5     <title></title>6     <Script>7 8         /*9          *Ten * JavaScript is divided into three sections: One * ECMAScript Standard: The basic syntax of JS A * Dom:document Object Model---> Document object models----elements of the action page - * Bom:browser Object Model-----> Browser Object Models---operation is browser -          * the * DOM: Document Object Model -          * - * Document: Consider an HTML file as a document, because everything is the object, so the document as an object - * An XML file can also be viewed as a document +          * - * HTML: Display information, display the data + * XML: Focus on storing data A * HTML file as a document, then this document as an object, all the tags in the document can be regarded as an object at          * - * Each tab in the page is an element, and each element can be viewed as an object - * Tags can be nested, labels have tags, elements have elements -          * - * The HTML page has a root tag--html--also called the root element -          * in * The page has a root element (tag--html), there are many elements (there are many tags, there are many objects) -          * to * Document: A page is a document +          * - * element: All tags on the page are elements, and elements can be viewed as objects the          * * * Node: All the content on the page is a node: tags, properties, text $ * Root: RootPanax Notoginseng          * -          * the * page is document--document, there is a root element in the document: HTML + * HTML--->head A *------>body---> Other tags the          * + * A tree chart, called a tree (DOM tree), consisting of all the elements (tags) in the document and the document -          * $          * */ $  -     </Script> - </Head> the <Body> - Wuyi </Body> the </HTML>

The concept and role of DOM in JavaScript

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.