Is it possible for me to get the href of all images on a page using JavaScript? This code gives me the src for those images, but I want to return the href for them.
function checkimages() {
var images = document.images;
for (var i=0; i<images.length; i++){
var img =images[i].src;
alert(img);
}
}