DOM Advanced Programming

Source: Internet
Author: User
Tags visibility

This article mainly introduces Dom advanced programming, the need for friends can refer to the following

The three-Class DOM standard interface (MAP) core DOM (Kernel DOM) is applicable to all kinds of structured documents. XML DOM (learned by Java OOP), designed for XML documents; HTML DOM, specifically for HTML documents, below are some of the following questions.

I. Location and History objects

Back ()//return

Forward ()

Go ()/forward




II. Application of location and history objects

The code is as follows:

  View Flowers Details

  Refresh this page

  Back to the main face

Third, the common properties of the Document object

1.referrer (returns the URL of the document that loads the current document)

2.URL (returns the URL of the current document) Document.referrer document. The common methods of the URL

Document object are the following


getElementById () (Returns a reference to the first object with the specified ID)

getelementsbyname () (Return A collection of objects with the specified name

getElementsByTagName (), which returns a collection of objects with the specified label name

Write () (writes text to the document, HTML expression, or JavaScript code)

Four , three different access page elements

getElementById () access by the ID name of the element

Getelementsbyname () access by the name of the element

Getelementsbytagna Me () to access

Five by label, display and hide of elements

1.visibility visible (indicates that the element is visible)

Hidden (indicates that the element is invisible) = "value"

2.display None (indicates that this element will not be displayed)

Block (means that this element is displayed as a block-level element with a newline character before and after it) "value"

Six, check The Checked property value of the box's

check box is selected: True is not selected: false

        Note < : More Wonderful tutorials please focus on Triple programming

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.