Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM embeds property

HTML DOM embeds property

Document Object Reference Document Object

Example

Count how many are in the document element:

var

x

=

document

.

embeds

.

length

;

Try it »


Definition and usage

embeds returns all in the document collection of elements.

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

Tip: See also Embed object.


Browser support

Union
embeds Yes Yes Yes Yes Yes

Syntax



document.embeds

property

property Description
length Returns the number of in the collection elements.
 **注意:** 该属性是只读的。 |


Method

Method Description
[index] Returns the element corresponding to the specified index (starting from 0) in the collection element.
 **注意:** 如果索引值超出范围,返回 null。 |

| item(index) | Returns the element corresponding to the specified index (starting from 0) in the collection element.

 **注意:** 如果索引值超出范围,返回 null。 |

| namedItem(id) | Returns the element corresponding to the specified index in the collection .

 **注意:** 如果 id 不存在,则返回 null。 |

Technical Details

DOM version: Core Level 3 Document Object
Return Value: HTMLCollection object, representing all in the document elements. The order of elements in the collection is their order in the source code.

Related pages

JavaScript Reference Manual: HTML DOM Embed object

HTML Reference Manual: HTML tag

Document Object Reference Document Object