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
The getElementById () method returns the element with the specified ID: example Http://www.w3school.com.cn/tiy/t.asp?f=dom_getelementbyid
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.