Document.images
document.images
는 현재 HTML document 내부의 images collection을 반환합니다.
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
– 페이지의 이미지 갯수를 반환하는 속성
document.images
는 DOM HTML의 part이며, HTML documents 에서만 지원된다.
Specifications
Specification | Status | Comment |
---|---|---|
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. |