Comprehensive Understanding of HTML Document objects

Source: Internet
Author: User

This article describes how to use an HTML Document object. Each HTML Document loaded into the browser becomes a Document Object. The HTML documentobject is a unique part of the window object, which can be accessed through the parameter Doc ument attribute.

HTML Document Object

Each HTML Document loaded into the browser will become a Document Object. The HTML Document object allows us to access all elements on the HTML page from the script.

Tip: the HTML documentobject is a Windows Object, and can be accessed through the temporary Doc ument attribute.

IE: InternetExplorer, F: Firefox, O: Opera, W3C: W3C standard.

Set of HTML Document objects

HTML Document Object Attributes

HTML Document Object Method

HTML Document Object Description

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

Many Attributes and methods are HTML Collection objects that can be indexed by an array or name), which stores references to the anchor, form, link, 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:

In Level 1 DOM, HTML Document 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 HTML Document rather than defined by it.
 

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.