With a certain understanding of HTML, I now begin to learn HTML DOM.

Source: Internet
Author: User

I can finally write my own thoughts.

  Before five weeks to learn xml,html, Xhtml,css,javascript language, they have a certain understanding. Today began to learn HTML DOM, I mostly from http://www.w3school.com.cn/this site started, very good. These days to read some knowledge of the HTML DOM, now I will be my understanding of her fur, of course, I understand very shallow, my direct purpose is not to muddle through, in the mind to understand the line, and to his understanding to write, hope that the great God of the blog Park can stay for a minute, leave more suggestions to me

Document Object model, referred to as the DOM.

      • DOM is the standard of the World Wide Web Consortium and is a rule.
      • The Dom defines the standard rules for accessing and manipulating HTML and XML content, like the VIP card we use to cut our hair, and the barber shop rules that only members can enjoy the offer, which is a standard, and the barber's rules are similar to the DOM, The content of the offer is like HTML or XML content in general, and only from this provision can the content be correctly accessed.
      • In the HTML DOM , all the elements are considered nodes, the entire HTML document as a node tree, and then using the standard methods defined in the Dom to access these nodes, which is actually the role of Dom , will the content of the HTML document is converted to a node form for easy access and use.
The following is an example of an HTML DOM node tree


with the concept of this node tree, we can use the DOM standard to access all node content in the node tree using the JavaScript language. All HTML element content is considered an object, and the object's properties and methods are the programming interface
    • getElementById () method

The getElementById () method returns the element with the specified ID: example Http://www.w3school.com.cn/tiy/t.asp?f=dom_getelementbyid

    • InnerHTML Property

The innerHTML property is used to get or replace the contents of an HTML document: Example http://www.w3school.com.cn/tiy/t.asp?f=dom_innerhtml

For more object methods and properties, visit http://www.w3school.com.cn/htmldom/dom_methods.asp

With a certain understanding of HTML, I now begin to learn HTML DOM.

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.