HTML DOM embedsProperty

Document 对象参考手册Document Object

Examples

Count how many <embed> elements are in the document:

var x = document.embeds.length;

Try it Yourself »

Definition and Usage

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

Note:Elements in the collection are ordered as they appear in the source code.

Tip:See alsoEmbed 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.

Note:This property is read-only.

Methods

Method Description
[index] Returns the <embed> element at the specified index (starting from 0) in the collection.

Note:If the index value is out of range, null is returned.
item(index) Returns the <embed> element at the specified index (starting from 0) in the collection.

Note:If the index value is out of range, null is returned.
namedItem(id) Returns the <embed> element corresponding to the specified index in the collection.

Note:If the id does not exist, null is returned.

Technical Details

DOM Version: Core Level 3 Document Object
Return Value: An HTMLCollection object representing all <embed> elements in the document. Elements in the collection are ordered as they appear in the source code.

Related Pages

JavaScript Reference:HTML DOM Embed Object

HTML Reference:HTML <embed> Tag

Document 对象参考手册Document Object

Other Extensions