Find out how many <embed> elements there are in the document:
The result of x will be:
The images collection returns a collection of all <embeds> elements in the document.
Note: The elements in the collection are sorted as they appear in the source code.
Tip: Also look at the Embed Object.
Collection | |||||
---|---|---|---|---|---|
embeds | Yes | Yes | Yes | Yes | Yes |
Property | Description |
---|---|
length | Returns the number of <embed> elements in the collection. Note: This property is read-only |
Method | Description |
---|---|
[index] | Returns the <embed> element from the collection with the specified index
(starts at 0). Note: Returns null if the index number is out of range |
item(index) | Returns the <embed> element from the collection with the specified index
(starts at 0). Note: Returns null if the index number is out of range |
namedItem(id) | Returns the <embed> element from the collection with the specified id. Note: Returns null if the id does not exist |
DOM Version: | Core Level 3 Document Object |
---|---|
Return Value: | An HTMLCollection Object, representing all <embed> elements in the document. The elements in the collection are sorted as they appear in the source code |
JavaScript reference: HTML DOM Embed Object
HTML reference: HTML <embed> tag