htmlcss
Line of inheritance:
Object ⇒ Node ⇒ Document
Stub

This article is a stub. Please help the wiki by coding it. Spamming and vandalism is not considered an improvement and will result in discipline, up to, and including a permanent block.


The most commonly accessed Document instance is Window.document.

Methods

getElementsByTagName

Data type function
Return type NodeList
Parameter list tagName (string)
Standard DOM Level 1, DOM Level 2
Documentation Mozilla, Microsoft

Finds every element in the document which has the specified tagName. The asterisk ("*") matches all elements.

See also

Element.getElementsByTagName

getElementsByTagNameNS

Data type function
Return type NodeList
Parameter list tagName (string), namespace (string)
Standard DOM Level 2
Documentation Mozilla

Finds every element in the document which has the specified tagName and namespace. If the tagName is only the asterisk ("*"), all elements in the specified namespace will be returned.

getElementById

Data type function
Return type Element
Parameter list id (string)
Standard DOM Level 1 HTML, DOM Level 2
Documentation Mozilla, Microsoft (IE8)

Finds the first element in the document which has the specified id. In Internet Explorer 7 or less, returns the first element with the specified name if the id is not found.