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

Location

HREF//link

Reload//Loading

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

Code:

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) object.style.visibility = "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) object.style.display= "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

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.