images | NN 3 IE 4 DOM 1 | |||
A collection (array) of all img objects contained by the document. This object is implemented only in browser versions that treat images as objects. Therefore, you can use the existence of this array object as a conditional switch surrounding statements that swap or preload images: if (document.images) { // process img element objects here } |
||||
Internet Explorer 3.01 for the Macintosh provided support for images as objects. |
||||
Object Model Reference | ||||
document.images |
||||
Object-Specific Properties | ||||
|
||||
Object-Specific Methods | ||||
|
length | NN 3 IE 4 DOM 1 |
Read-only | |
Returns the number of elements in the collection. |
|
Example | |
var howMany = document.images.length; |
|
Value | |
Integer. |
item( ) | NN 6 IE 4 DOM 1 |
item(index[, subindex]) item(index) | |
Returns a single image object or collection of image objects corresponding to the element matching the index value (or, optionally in IE, the index and subindex values). |
|
Parameters | |
|
|
Returned Value | |
One object or collection (array) of objects. If there are no matches to the parameters, the returned value is null. |
namedItem( ) | NN 6 IE 6 DOM 2 |
namedItem(IDOrName) | |
Returns a single object corresponding to the element matching the parameter string value. |
|
Parameters | |
|
|
Returned Value | |
One object reference. If there are no matches to the parameters, the returned value is null. |
urns( ) | NN n/a IE 5(Win) DOM n/a |
urns(URN) | |
Returns a collection of nested element objects that have behaviors attached to them and URNs that match the URN parameter. |
|
Parameters | |
|
|
Returned Value | |
A collection (array) of objects. If there are no matches to the parameters, the returned value is an array of zero length. |