HTML DOM Document ingesloten
Voorbeeld
Aantal <embed> elementen in een document:
let num = document.embeds.length;
Definitie en gebruik
De embeds
eigenschap retourneert een verzameling van alle <embed>-elementen in het document.
De embeds
eigenschap is alleen-lezen.
Waarschuwing
De meeste browsers ondersteunen geen ingesloten applets of plug-ins meer.
Ingesloten ActiveX-besturingselementen worden in geen enkele browser meer ondersteund.
Shockwave Flash is ook uitgeschakeld in moderne browsers.
Suggesties
Gebruik de <img>
tag om een afbeelding in te sluiten.
Gebruik de <iframe>
tag om HTML in te sluiten.
Gebruik a <video>
of <audio>
tag om video of audio in te sluiten.
Zie ook:
Syntaxis
document.embeds
Eigenschappen
Property | Description |
length | The number of <embed> elements in the collection. |
Methoden:
Method | Description |
[index] | Returns the element with the specified index (starts at 0). Returns null if the index is out of range. |
item(index) | Returns the element with the specified index (starts at 0). Returns null if the index is out of range. |
namedItem(id) | Returns the element with the specified id. Returns null if the id does not exist. |
Winstwaarde
Type | Beschrijving |
Knooppuntlijst | Een HTMLCollection . Alle <embed> elementen in het document. Gesorteerd zoals ze in de broncode voorkomen. |
Browserondersteuning
document.embeds
is een DOM Level 3 (2004)-functie.
Het wordt volledig ondersteund in alle browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 9-11 | Yes | Yes | Yes | Yes |