The Attr node inherits from Node, but is not considered a part of the document tree. Common Node attributes like parentNode, previousSibling, and nextSibling are null for an Attr node. You can, however, get the element to which the attribute belongs with the ownerElement property.
children is a HTMLCollection, which is an ordered collection of DOM elements that are children of node. If there are no element children, then children contains no elements and has a length of 0.
children 只包含 dom nodes。The Attr node inherits from Node, but is not considered a part of the document tree
https://developer.mozilla.org/en-US/docs/Web/API/element/getAttributeNodehttps://developer.mozilla.org/en-US/docs/Web/API/ParentNode/children