I’ve got an empty DIV element in which I append images by using function createElement(‘img’) and append them with appendChild. So now I’ve got DIV element full of images.
I would like to use one button to clean this DIV and add new images in it simultaneously. Thanks for your help
Are you just looking for method
replaceChild? Or you could remove all child elements before adding new images: