FANDOM


Line of inheritance:
Object ⇒ Node ⇒ Document


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.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.