+ 2
How to delete an unordered list elements using JavaScript?
Delete/strike the values in <li> tags in a web page by just clicking on them using the JavaScript.
3 Réponses
+ 6
<ul onclick="document.getElementById(event.target.id).style.textDecoration = 'line-through'">
<li id="list1">HTML</li>
<li id="list2">CSS</li>
<li id="list3">JavaScript</li>
</ul>
https://code.sololearn.com/WWrfkrqsF5fe/?ref=app
+ 5
Element.remove() for deletion
https://code.sololearn.com/WliHs9T61IPm/?ref=app
+ 2
thank you mate.