How do I access the dom element I'm creating?
Please tell me, I have a functionality that creates elements, how can I access them later? I created a table through the dom with a certain class, but I can’t access it through QuerySelector, QuerySelectorALL, etc., as a result, when you click on delete - & gt; remove selected element
When creating a TR, you need to hang a unique ID on it.
And also when creating a button to delete in TR, hang on the onclick button or addEventLisner
with the id of this tr.
And you will have a function like del (id)
where you look for tr by id and remove it
this is the easiest optionHannah Gallagher
To place the code, please use CodePen or similar tool. Thanks you!