jens1701;1014233 wrote:
Flanagan stated that Dom api method getElementsByTagName returns the found Elements in form of an array.
So why are there differences in the firebug debig display mentioned above.´?
I don't know who Flanagan is, but they are mistaken.
None of the array methods are available on collections.
If you want use Array.map for example, you need to convert it into an array first.
mrhoo's method works in FireFox, but won't work in IE.
A cross browser method:
function obValsLen(ob){var r=[],i=0,mx=ob.length;for(var z=0;z<mx;z++){r[z]=ob[z];}return r;}
//usage example:
array=obValsLen(document.getElementsByTagName("div"));