I\'m trying to get all the elements (tags) inside the Body tag of an HTML page in an array using pure javascript. I mean without using any framework (ex. JQuery).
I
If you want all elements inside the body tag, not just first level children, you can simply use getElementsByTagName() with a wildcard:
getElementsByTagName()
var elems = document.body.getElementsByTagName("*");