The node to be removed is not a child of this node参考原因呢是因为onclick会覆盖之前的onclick,而addEventListener不会。你每次发布会将已存在的按钮的事件重复绑定一次。导致删了之后会再删,而此时节点已经不存在了。for 循环删了,直接绑定给deldel.addEventListener("click",function(){ console.log(this.parentNode) debugger show.removeChild(this.parentNode);});