Answers for "how to clear div child in 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 "how to clear div child in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language