What is Dom

https://www.jb51.net/article/25107.htm

Dom English name translated into Chinese -Document Object Model that is: to document as models. Sounds term, in fact, the relationship between the structure of the document contents. Document type can be HTML or XML.

Dom: English name translated into Chinese -Document Object Model that is: to document as models. Sounds term, in fact, the relationship between the structure of the document contents. Document type can be HTML or XML
Dom has the ability to control access to files and XML files Html elements, the simple point that Dom can use a html or xml file to add, modify, delete elements. Change its existing structure or content.

 

 

In this focus on user experience of web design era, Dom is critical. If you are an experienced web designer, you should have seen or used these commands or methods getElementById getElementsByTagName offsetParent appendChild getAttribute but so far some people still think that these things are in JavaScript, it is not true, these are all very important method Dom!

 

 

Dom What can be done in a web page?
HTML Dom is the most commonly used method to find a few of the elements of
Dom entire page of the reference to the current document: the Document
Dom how to quickly find an element in the page: getElementById
Dom find a set of labels, label element has the same name: getElementsByTagName
under the label Id attribute value or name attribute to find multiple elements: getElementsByName

 

In Dom create, add, delete, modify, replace, copy, web page text tags and methods are as follows.
Create a label elements in a web page: createElement
to create a text content: createTextNode
add elements to the page: appendChild
Dom methods to remove elements are: removeChild
modify the properties of the page label elements: setAttribute
replace existing tags or elements: replaceChild
copy cloning existing tags or elements: cloneNode
retrieve and modify html tags within the text content elements: innerHTML
obtain or modify elements of the text, only supports IE: innerText
obtain or modify the text element, supports FF: textContent

 

Manual html, css manuals, dom manual, javascript manual, xmlhttp manual.

Guess you like

Origin www.cnblogs.com/baxianhua/p/11850126.html