Easy Tutorial
❮ Event Oncut Prop Anchor Target ❯

HTML DOM embeds Property

Document Object

Example

Calculate the number of <embed> elements in the document:

var x = document.embeds.length;

Definition and Usage

The embeds property returns a collection of all <embed> elements in the document.

Note: The order of the elements in the collection is the same as their order in the source code.

Tip: Also refer to the Embed Object.


Browser Support

Collection
embeds Yes Yes Yes Yes Yes

Syntax

document.embeds

Properties

Property Description
length Returns the number of <embed> elements in the collection. <br> <br> Note: This property is read-only.

Methods

Method Description
[index] Returns the <embed> element at the specified index (starting from 0). <br> <br> Note: Returns null if the index is out of range.
item(index) Returns the <embed> element at the specified index (starting from 0). <br> <br> Note: Returns null if the index is out of range.
namedItem(id) Returns the <embed> element with the specified ID. <br> <br> Note: Returns null if the ID does not exist.

Technical Details

DOM Version: Core Level 3 Document Object
Return Value: HTMLCollection object, representing all <embed> elements in the document. The order of elements in the collection is the same as in the source code.
--- ---

Related Pages

JavaScript Reference: HTML DOM Embed Object

HTML Reference: HTML <embed> Tag

Document Object

❮ Event Oncut Prop Anchor Target ❯