What I mean is how does JavaScript store DOM elements when you do something like:
var foo = document.getElementsByTagName('p');
what does foo become? an array of objects? and how can I add more elements to that variable, for example:
var bar = document.form[0].getElementsByTagName('input'); // 5 elements
var foo = document.form[1].getElementsByTagName('input'); // 4 elements
bar =+ foo;
for (i=0;i<bar.length;i++){
console.log(bar.value); // 9 logged values
}
Is it possible to add more elements of the same type to a variable that already has elements in it? Do I have to loop trough all elements in the variable I want to add and "push" them in the variable I want all the data in?
and name is attribute such as