HTML DOM (Learning note i)

Source: Internet
Author: User

Well, the work also has a period of time, the understanding of programming also in-depth some, previously thought that Html/css/javascript is relatively simple, see the online tutorial can be, the network is I learn these knowledge often go to a website, very grateful she let me learn more about the front end of the knowledge, But now I don't see it, the front-end engineers are most important to work through these (of course, the problem must be more and more extensive, architecture issues, compatibility issues, performance issues, and a variety of plug-ins, JS libraries and various tools in the front end, etc.), these content is very rich, I am also very interested in this and feel more professional! At least it makes me feel better than every day, change the bug, modify the data for the customer, write some documents, test, publish, back and forth between several items of the switch to be fun! I used to write a blog always want to write some people have never written, their own experience, for others and they have some valuable things! Now I feel that my learning experience is to be recorded, after all, even if the simple knowledge, if not often used will be gradually blurred with the passage of time, recorded, even in accordance with their own understanding of the collation can deepen their understanding of knowledge! I am not a genius, there is no formula in the head, no code, no treatment of the world a special way of understanding, then I choose the step by step of the down-to-earth!

What is 1:html DOM?

Let's take a look at the structure of a simple HTML document

<!DOCTYPE HTML><HTMLLang= "en">    <Head>        <Linkrel=stylesheethref="">        <MetaCharSet= "UTF-8">        <title>Document title</title>    </Head>    <Body>        <Div>Text content</Div>        <Div>             <Div></Div>        </Div>        <Table></Table>    </Body></HTML>

If we rotate this document 90 degrees clockwise, we'll see the following look

The English name of the HTML DOM is:Hyper Text Markup Language Document Object Model translated into Chinese yes, Document Object model for Hypertext Markup Language. My understanding is to look at the HTML document in a different perspective, as an upside down DOM tree, the operation of the HTML document can be seen as the operation of the DOM tree, everything in the HTML document is mapped to this DOM tree!

The explanation is that the DOM is the standard of the cloud, Dom defines the standard for accessing HTML and XML documents (the system is a platform-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of the document.) The standard is divided into 3 different parts:

1) Core dom--Standard Model for any structured document

2) XML dom--Standard Model for XML documents

3) HTML dom--model for HTML documents

Here we only care about the HTML DOM, the official description of which he is:

1) Standard object model for HTML

2) Standard programming interface for HTML

3) Standard

The HTML DOM defines the objects and properties of all HTML elements, as well as the methods of accessing them. Simply put, the HTML DOM is the standard for how to get, modify, add, or delete HTML elements. That is, the way to manipulate HTML documents in a different way, the main thing is to add the JavaScript script language to participate in the operation of the HTML document!

What is the role of 2:html DOM?

Well, the main thing is to enhance the dynamic interactivity of the site, because you can use JavaScript or server-side script to control the HTML document!

What is the content key point of the 3:html DOM?

I think the HTML document into the DOM tree from this perspective, in the DOM tree to manipulate, whether it is to modify, add, delete, or change the structure of the node or style, the first step is always to get a node, just like the data in the database to operate the same as add and remove changes, check the status is very important! Therefore, I door to the method and properties of the query is to be particularly diligent to learn!

4:html the basic content of DOM?

Learning HTML DOM Before you need to understand html/css/javascript, as expressed, only the four of the cooperation can be more flexible and colorful to show more fun page!

Of course, using the DOM tree to express the HTML document must also have its own set of control methods, and we want to transform the perspective in a comprehensive way. We need to learn some ways to get the nodes in the DOM tree, how to modify the nodes, how to add nodes, how to delete nodes, how to change the style, structure, and so on, to learn some of the various types of nodes and the properties of the node related content, and the HTML link, we need to know what a node is the label, The content of his attributes, his events, his connections to other nodes, and so on, the way, the way, the properties, the events, and so on, which you can think of more reasonable and control the DOM tree, is what we want to learn.

Well, the goal of this article is to let me have a clearer understanding of the HTML DOM, let me know what she is, what it is, what it is, and then I will slowly add it to the content! Thanks w3c!

HTML DOM (Learning note i)

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.