Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Unsere Freiwilligen haben diesen Artikel noch nicht in Deutsch übersetzt. Machen Sie mit und helfen Sie, das zu erledigen!

document.images returns a collection of the images in the current HTML document.

Syntax

var htmlCollection = document.images;

Example

var ilist = document.images;

for(var i = 0; i < ilist.length; i++) {
    if(ilist[i].src == "banner.gif") {
        // found the banner
    }
}

Notes

document.images.length – property, returns the number of images on the page.

document.images is part of DOM HTML, and it only works for HTML documents.

Specifications

Specification Status Comment
WHATWG 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.
Recommendation Initial definition.

Schlagwörter des Dokuments und Mitwirkende

 Zuletzt aktualisiert von: Makyen,