Answers for "clean child of element javascript"

-1

javascript clear child elements

parent.querySelectorAll("*").forEach(child -> child.remove());

//Change the value of * if there is a specific class you want to remove 
//otherwise leave the * for removing all child elements.
Posted by: Guest on June-19-2021

Code answers related to "clean child of element javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language