[Javascript] Listing Images on current page

Peter Brunone peter at brunone.com
Thu Sep 6 09:41:29 CDT 2007


Assuming you mean <img /> elements, you can do this:

var aImages = document.getElementsByTagName("IMG");

Now you have an array of all image elements in the page and you can loop through it to analyze each element.

Cheers,

Peter

From: "Del Wegener" del at delweg.com

Good Morning;

How do I get a list of the images on the current page ?
With JavaScripot of course.
Thanks in advance

Del
del at delweg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070906/9e9bd466/attachment.htm>


More information about the Javascript mailing list