# Find number of element in document

**URL:** <https://forum.kirupa.com/t/find-number-of-element-in-document/218597>\
**Category:** Uncategorized\
**Created:** [March 9, 2007, 2:42am UTC](https://forum.kirupa.com/t/find-number-of-element-in-document/218597 "2007-03-09T02:42:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)\
**Post date:** [March 9, 2007, 2:42am UTC](https://forum.kirupa.com/t/find-number-of-element-in-document/218597/1 "2007-03-09T02:42:44Z")

</div>

edit: found answer to previous problem

have a new question:

i need to be able to target the h4’s in a specific div, rather than just the body

what i have now:

```auto

var directChangerElements = document.getElementsByTagName("h4");

```

i need something like this (this isnt working):

```auto

var directChangerElements = document.getElementsbyClass('navigation').getElementsByTagName("h4");

```
