Incorpora documenti HTML DOM
Esempio
Numero di elementi <embed> in un documento:
let num = document.embeds.length;
Definizione e utilizzo
La embeds
proprietà restituisce una raccolta di tutti gli elementi <embed> nel documento.
La embeds
proprietà è di sola lettura.
Avvertimento
La maggior parte dei browser non supporta più applet o plug-in incorporati.
I controlli ActiveX incorporati non sono più supportati in nessun browser.
Shockwave Flash è disattivato anche nei browser moderni.
Suggerimenti
Per incorporare un'immagine, usa il <img>
tag.
Per incorporare l'HTML, usa il <iframe>
tag.
Per incorporare video o audio, usa un tag <video>
o .<audio>
Guarda anche:
Sintassi
document.embeds
Proprietà
Property | Description |
length | The number of <embed> elements in the collection. |
Metodi
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. |
Valore di ritorno
Tipo | Descrizione |
Elenco dei nodi | Una raccolta HTML . Tutti gli elementi <embed> nel documento. Ordinati come appaiono nel codice sorgente. |
Supporto browser
document.embeds
è una funzionalità DOM di livello 3 (2004).
È completamente supportato in tutti i browser:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 9-11 | Yes | Yes | Yes | Yes |