元素是HTML中的一个节点的实例吗? [英] Is an Element an instance of a Node in HTML?
本文介绍了元素是HTML中的一个节点的实例吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
元素是HTML中的一个节点的实例吗?
我认为属性也是节点,元素是可以定义的节点集合使用角括号语法?
解决方案
是的,它是 Node
根据
Is an Element an instance of a Node in HTML?
I presume Attributes are also Nodes and that "the Elements" is the set of Nodes that can be defined using the angle-bracket syntax?
解决方案
Yes it is a Node
, according to the MDN documentation for HTMLElement
:
Inherits properties from its parents
Node
, and its own parent,EventTarget
, and implements those ofParentNode
,ChildNode
,NonDocumentTypeChildNode
, andAnimatable
.
If that's a bit hard to find in text, MDN also provides an "Inheritance section" in the left sidebar.
这篇关于元素是HTML中的一个节点的实例吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文