Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new nod

来源:互联网 发布:万里独行知马力 编辑:程序博客网 时间:2024/04/30 20:57

insertBefore插入节点出错

Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node插入的节点不是插入在,子节点之前!

insertBefore() 方法在您指定的已有子节点之前插入新的子节点。

node.insertBefore(新节点,node的子节点);
阅读全文
0 0
原创粉丝点击