Re: About the DOM document object



"Draenox@xxxxxxxxx" <Draenox@xxxxxxxxx> wrote in comp.lang.javascript:

In an if statement with "document.images" as it's expression, does it
simply check if there are any image elements in an HTML page? I'm
assuming if it finds any that the expression will return true and
execute the statements within the if.

if(document.images)
{
// various statements....
}


Since the 'images' property is an array ("collection"?), I would guess that
if you really wanted to find a condition in which there are images truly in
the document, why not evaluate: if (document.images.length > 0)
.



Relevant Pages