Answer the question
In order to leave comments, you need to log in
JS DOM. Triggering of events. How to make the picture disappear when clicked?
there is a div#id='images' in the non-image .
I want it to disappear when I click on the image.
var images = document.querySelectorAll('#images img ');
images.addEventListener('click' function () {
images.parentNode.removeChild(images.parentNode.firstChild);
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question