无法找到元素 tagName 到 HTMLElement 的映射,例如:
'DIV': HTMLDivElement
'A': HTMLAnchorElement
例如,不存在 1:1 映射
'B': HTMLElement
'S': HTMLElement
如果所述引用包含粗体和删除线 HTMLElement
之间的区分特征,那就太好了,但也许我希望太多了。
这必须存在于 webland 的某个地方......
最佳答案
MDN 上有一个列表:
https://developer.mozilla.org/en/Gecko_DOM_Reference#section_14
看起来它将 DOM 对象映射到相应的 HTML 元素:
HTMLElement, directly implemented by: <dd>, <dt>, <tt>, <i>, <b>, <u>, <s>, <strike>, <big>, <small>, <em>, <strong>, <dfn>, <code>, <samp>, <kbd>, <var>, <cite>, <acronym>, <abbr>, <sub>, <sup>, <bdo>, <center>, <address>, <noframes>, <wbr>, <noscript>, <noembed>, <header>, <footer>, <article>, <aside>, <section>, <nav>, <figure>, <figcaption>, <mark>, <ruby>, <rt>, <rp>
HTMLAnchorElement, implemented by: <a>
HTMLAppletElement, implemented by: <applet>
...
关于javascript - 在javascript dom中,是否有tagName到HTMLElement的映射?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7219378/