P
P
Pervachok2018-03-04 17:30:34
JavaScript
Pervachok, 2018-03-04 17:30:34

How to get an array of SRC images from a folder, all images have different names?

You need to create an array of SRC paths to images using JS, all images have different names.
Is there a way to iterate over the images in a folder using JS?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2018-03-04
@KickeRockK

give them one class?
Or if you all want pictures

var imgs = document.getElementsByTagName("img");
var src;
imgs.forEach(function(element) {
src = element.src;
  console.log(src);
});

Stop. In what folder?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question