Remove multiple elements with same name using removeChild?
问题 I have an elements with multiple elements inside. The elements inside all have the same name. Is there away to have a function remove all of them? (refer to this question for example Remove multiple children from parent? 回答1: Here's a solution that removes the first level children with the specified name for the parent with the specified id. If you want to go deeper, you can recursively call it on the child elements you get inside (you'll have to add a parent parameter as well). function