I'm trying to get all of the following tags inside the body (INPUT, A, and BUTTON) is there a way to do that without having to loop through all the tags inside the body using javascript
var allInputTags = document.body.getElementsByTagName('*');
I was thinking to do something like
var inputtags = document.body.getElementsByTagName('INPUT');
var atags = document.body.getElementsByTagName('A');
var buttontags = document.body.getElementsByTagName('BUTTON');
var allTags = inputtags + atags + buttontags;
but I think in that way I will not get the elements in the order they appear in the Body.