Javascript removeChild(): delete node
removeChild() method is used to delete a child node of the parent node.
Syntax:
parent.removeChild(thisNode)
Parameter description:
For example, delete id=" demo" node statement is:
var thisNode=document.getElementById("demo"); thisNode.parentNode.removeNode(thisNode);
For example, delete the node:
点击删除我
It can be seen that although Javascript only provides one method to delete nodes, it is enough.