1. Create element node: createelement
Usage: document.createelement ("P");//create P tag;
Create text node: createTextNode;
Usage: document.createTextNode ("txt");//create text label;
2. Insert node: appendchild: Called on the element node to be inserted, he inserts the specified node to make it the last child node of that node.
InsertBefore: Inserts a new element before the existing element;
InsertAfter: Inserts a new element after the existing element;
3. Delete node: removechild; Removes a node from the document tree (first the parent node to delete the node is deleted);
Usage: var para1=document.getelementbyid ("P1");
Para1.parentNode.removeChild (PARA1);
4, replace node: replacechild; replace one node with another (the parent node of the node to be replaced is first found, replaced with the parent node);
method of creating, inserting, deleting, querying, replacing DOM nodes (JS implementation)