Warm reminder: Dom Document Object Model CHM version provides download click to download
What is DOM
Dom: English full name-document Object model translated into Chinese is: Document to Image models. Sounds like terminology, but it's the structure of the content of the document. The document type can be HTML or XML
DOM has access control over HTML files and XML file elements, simply by using DOM to add, modify, and delete elements to an HTML or XML file. Change its existing structure or content.
If you haven't touched DOM, you'll find Dom amazing ... Whether you're a rookie or a whiz, Dom is critical in this user-focused web design era. If you are an experienced web designer, you should have seen or used the following commands or methods getElementById getElementsByTagName offsetparent appendchild getattribute But there are still those who think these are all JavaScript things, but they are all very important methods in DOM! I guarantee that the DOM manual provided by the Web circle will be the most extensive in this century, involving the most comprehensive DOM content. Read it carefully young programmers, believe that he will help you!
What can DOM do in a Web page?
find elements of the most commonly used methods in HTML Dom
- Dom references the current entire Web page document: Documents
- How can dom quickly find an element in a Web page: getElementById
- The DOM looks for a set of labels with the same name as a LABEL element: getElementsByTagName
- Find multiple elements based on the label's ID attribute value or the Name property: Getelementsbyname
Dom creates, adds, deletes, modifies, replaces, duplicates, tags and text content in Web pages as follows.
- Create a LABEL element in a Web page: createelement
- Create a paragraph of text content: createTextNode
- To add an element to a Web page: appendchild
- The DOM method for deleting an element is: RemoveChild
- To modify the properties of a LABEL element in a Web page: setattribute
- Replace an existing label or element: ReplaceChild
- Clone a label or element that already exists: CloneNode
- Get and modify HTML tags and text content within an element: InnerHTML
- Gets or modifies the textual content of the element, supporting only Ie:innertext
- Gets or modifies the textual content of an element to support ff:textcontent
The HTML Dom also provides a set of interfaces that manipulate the table elements in a Web page
- The InsertRow method in the HTML Dom can add a row to the table
- The way to delete a row in a table is: DeleteRow
- The Insertcell method in the HTML DOM can add a column to a row in the table
- The way to delete a column in a row is: Deletecell
- The Createcaption method in the HTML Dom can create a caption for a table
- The Createthead method in the HTML Dom can create a thead for the table
- The Createtfoot method in the HTML Dom can create a tfoot for the table
- The properties of all the rows in the reference table are: rows
- Referencing all columns of a row in a table: cells
- Move rows in a table, only support Ie:moverow
commands for manipulating parent elements, child elements, and sibling elements in the DOM
- The directive to get the parent element is: parentnode
- Gets the first child element in an element: FirstChild
- Gets the child element at the back of the element: LastChild
- Gets all the child elements in the element: ChildNodes
- Get the previous sibling element: PreviousSibling
- Get the last sibling element
Author: Candon 2010-10-22
Dom Manual usage instructions
You see the list on the left, which is the Dom manual , and you can click on them to learn more about their details and usage. Use the index box to quickly find what you want in the DOM manual list. All of the DOM's methods or properties are in English letters, so Chinese searches are not supported. For example, you can try to enter offsettop or offsetleft Auto Fill function will make you more effective. The manual displays 50 items per page, which you can use for page navigation. If you don't find what you want in the DOM manual, check out the DOM manual refinement plan below!
DOM Handbook Perfect Plan
The Web Circle is dedicated to creating the most detailed HTML manuals, CSS manuals, Dom manuals, JavaScript manuals, and XMLHTTP manuals . This can not be separated from your support and participation! The Master will have fun with the crowd, the division is our eternal theme, So don't skimp on your code. Only sharing, in order to improve together. If you do not find what you want in the CSS book's content, please participate in our improvement program, or you may be able to supplement it with explanations that are not in place in the contents of the DOM manual. We are very happy to receive your advice! Participate in the Handbook Improvement Program
The features of the DOM manual
The features of the DOM online manual provided by the
Web Circle are: A syntax description for each Dom method or property , which demonstrates a deep understanding of each Dom's methods or properties. Each method or attribute is compatible with the browser and whether it is attached to the standard of the consortium. And let each netizen participate in it, and strive to brainstorm.