document.images
restituisce una collezione delle immagini nel documento HTML corrente.
Sintassi
var htmlCollection = document.images;
Esempio
var ilist = document.images;
for(var i = 0; i < ilist.length; i++) {
if(ilist[i].src == "banner.gif") {
// found the banner
}
}
Note
document.images.length
– proprietà che restituisce il numero di immagini della pagina.
document.images
è parte del DOM HTML, e funziona solo per documenti HTML.
Specifiche tecniche
Specifiche tecniche | Stato | Commento |
---|---|---|
HTML Living Standard The definition of 'Document.images' in that specification. |
Living Standard | |
Document Object Model (DOM) Level 2 HTML Specification The definition of 'Document.images' in that specification. |
Obsolete | Initial definition. |