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
II. Application of location and history objects
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