Properties
These properties are available on all Element instances.
Methods
These methods are available on all Element instances.
getElementsByTagName
| Data type | function |
|---|---|
| Return type | NodeList |
| Parameter list | tagName (string) |
| Standard | DOM Level 1 Core, DOM Level 2 Core |
| Documentation | Mozilla, Microsoft |
Finds every element in the document which has the specified tagName and is contained by the current element. The asterisk ("*") matches all elements below this one.
See also
getElementsByTagNameNS
| Data type | function |
|---|---|
| Return type | NodeList |
| Parameter list | tagName (string), namespace (string) |
| Standard | DOM Level 2 Core |
| Documentation | Mozilla |
Finds every element in the document which has the specified tagName and namespace and is contained by the current element. If the name is only the asterisk ("*"), all elements below this one in the specified namespace will be returned.
See also
Document.getElementsByTagNameNS
getElementById
| Data type | function |
|---|---|
| Return type | Node |
| Parameter list | id (String) |
| Standard | |
| Documentation | Mozilla |
Finds an element in the document which has the specified id and is the child (or descendant) of the current element.
See also
getElementsByClassName
| Data type | function |
|---|---|
| Return type | NodeList |
| Parameter list | className (String) |
| Standard | |
| Documentation | Mozilla |
Finds every element in the document which has the specified className, and is the child (or descendant) of the current element. The asterisk ("*") matches all the class names below this one.