mdn & remove & removeChild
mdn & remove & removeChild
Element
https://developer.mozilla.org/en-US/docs/Web/API/Element
Node
https://developer.mozilla.org/en-US/docs/Web/API/Node
https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild
const oldChild = node.removeChild(child);
// OR
node.removeChild(child);
https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove
node.remove();
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12397428.html
未经授权禁止转载,违者必究!