ParentNode.children 是一个只读属性,返回 一个Node的子elements,是一个动态更新的 HTMLCollection。 Internet Explorer 6 - 8 支持该属性,会错误地包含注释Commit 节点,导致获取 children 出错。 在需要兼容 ie8 以下时,需要注意 html 页面响应位置是否包含注释Commit 节点并除去。 转载于:https://www.cnblogs.com/intangible/p/7514085.html