Java list get code

why am i not getting a list of pictures?

is the code correct?

(function() {
var Thumbnail = new Object();
    thumbimages = document.getElementsByClassName("wallpapers__item__img");


    for(var i = 0; i < 33; i++) {
        Thumbnail[i] = thumbimages[i].src;
    }

var allData = new Object();
allData = {Thumbnail};
return JSON.stringify(allData);
})();```

Try this class name,

wallpapers__item

And get img src

1 Like

does not work. i tried this class and this wallpapers__item__wall

(function() {
var Thumbnail = new Object();

thumbimages = document.getElementsByTagName("img");


for(var i = 0; i < 33; i++) {
    Thumbnail[i] = thumbimages[i].src;
}

var allData = new Object();
allData = {Thumbnail};
return JSON.stringify(allData);
})();

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.