Dom Document Object

Source: Internet
Author: User
Document Object:
Each HTML document loaded into the browser will become a Document Object.
The document object allows us to access all elements in the HTML page from the script.
Tip: The document object is part of the window object and can be accessed through the document DOC ument attribute. , Document Object Description:

The htmldocument interface extends the DOM Document Interface and defines HTML-specific attributes and methods.

Many Attributes and methods are htmlcollection objects (in fact, read-only arrays that can be indexed with arrays or names), which store references to the anchor, forms, links, and other Scriptable elements.

These set attributes are derived from level 0 Dom. They have been replaced by document. getelementsbytagname (), but they are often used because they are convenient.

The write () method is worth noting that when a document is loaded and parsed, it allows a script to insert dynamically generated content into the document.

Note that in level 1 Dom, htmldocument defines a very useful method named getelementbyid. In Level 2 Dom, this method has been transferred to the document interface, which is now inherited by htmldocument rather than defined by it.

 

Note: This content is refreeed to Baidu.

Dom Document Object

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.