assuredlonewolf Posted June 13, 2010 Share Posted June 13, 2010 what are collections For example: anchors[] forms[] images[] links[] Link to comment Share on other sites More sharing options...
Ingolme Posted June 13, 2010 Share Posted June 13, 2010 They're just easy ways to access some elements on the page.If you want to access the first image element that's on the page, you would use document.images[0] Link to comment Share on other sites More sharing options...
iwato Posted June 13, 2010 Share Posted June 13, 2010 They're just easy ways to access some elements on the page.If you want to access the first image element that's on the page, you would use document.images[0] Ingolme, you have a new avatar. I like it.Would it be appropriate to say that a collection is a global array whose elements are automatically filled according to the page to which it refers? If not, how is a collection formally described?Roddy Link to comment Share on other sites More sharing options...
Ingolme Posted June 13, 2010 Share Posted June 13, 2010 You're correct. I don't know about "formally describing."These collections are arrays, yes. Each of the collections is an array with a list of the specified elements on the page in the order that they are given in the source code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.