Saturday, July 16, 2011

Trick to tell the number of links, images, or forms on a webpage

I have no idea WHY you might want to do this, but you can. :]

For each of these, put the following in the URL bar at the top, and hit enter:

To find the number of links...
javascript:alert(document.links.length)

To find the number of images...
javascript:alert(document.images.length)

To find the number of forms...
javascript:alert(document.forms.length)

No comments:

Post a Comment

Please be considerate in what you say.