A detailed description of what Dom is _dom

Source: Internet
Author: User
Tags object model
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

    1. Dom references the current entire Web page document: Documents
    2. How can dom quickly find an element in a Web page: getElementById
    3. The DOM looks for a set of labels with the same name as a LABEL element: getElementsByTagName
    4. 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.
    1. Create a LABEL element in a Web page: createelement
    2. Create a paragraph of text content: createTextNode
    3. To add an element to a Web page: appendchild
    4. The DOM method for deleting an element is: RemoveChild
    5. To modify the properties of a LABEL element in a Web page: setattribute
    6. Replace an existing label or element: ReplaceChild
    7. Clone a label or element that already exists: CloneNode
    8. Get and modify HTML tags and text content within an element: InnerHTML
    9. Gets or modifies the textual content of the element, supporting only Ie:innertext
    10. 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
    1. The InsertRow method in the HTML Dom can add a row to the table
    2. The way to delete a row in a table is: DeleteRow
    3. The Insertcell method in the HTML DOM can add a column to a row in the table
    4. The way to delete a column in a row is: Deletecell
    5. The Createcaption method in the HTML Dom can create a caption for a table
    6. The Createthead method in the HTML Dom can create a thead for the table
    7. The Createtfoot method in the HTML Dom can create a tfoot for the table
    8. The properties of all the rows in the reference table are: rows
    9. Referencing all columns of a row in a table: cells
    10. Move rows in a table, only support Ie:moverow
commands for manipulating parent elements, child elements, and sibling elements in the DOM
    1. The directive to get the parent element is: parentnode
    2. Gets the first child element in an element: FirstChild
    3. Gets the child element at the back of the element: LastChild
    4. Gets all the child elements in the element: ChildNodes
    5. Get the previous sibling element: PreviousSibling
    6. 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.

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.