+ 1
Use javascript/jQuery to get the src of images from a website
Hai, I need to load a website using a javascript code and to get the details of img src s on that website by using JavaScript.Could anyone help me?
1 Answer
0
you can use
// var images = getElementsByTagName('image');
to get the image tags into an array and then use
// for(i = 0;i <images.length; i++){
// var imgSrc = images[i].getAttribute('src');
// console.log(imgSrc);
// }
you can see the image src's in the console.
** correct me if im wrong