综述:

可以将其看做是依次继承的关系:

Node

Node

A Node is an interface from which a number of DOM types inherit, and allows these various types to be treated (or tested) similarly(好几种dom类型都继承自node接口,这些dom类型对外会表现的很相似).

The following interfaces(下面的这些接口都继承自Node的方法和属性,包括Document节点、Element节点等等) all inherit from Node its methods and properties: Document, Element, CharacterData (which Text, Comment, and CDATASection inherit), ProcessingInstruction, DocumentFragment, DocumentType, Notation, Entity, EntityReference

These interfaces may return null in particular cases where the methods and properties are not relevant. They may throw an exception - for example when adding children to a node type for which no children can exist.

Document

Document

Document接口为浏览器中的任何网页提供了统一的接口

The Document interface represents any web page loaded in the browser(浏览器中的任何网页) and serves as an entry point into the web page's content, which is the DOM tree. The DOM tree includes elements such as <body> and <table>, among many others. It provides functionality global to the document, like how to obtain the page's URL and create new elements in the document.

The Document interface describes the common properties and methods for any kind of document(为任何一种document文档都提供了普遍的属性和方法)Depending on the document's type(根据文档类型的不同,HTML类型的提供了HTMLDocument接口,XML和SVG提供了XMLDocument接口) (e.g. HTML, XML, SVG, …), a larger API is available: HTML documents, served with the text/html content type, also implement the HTMLDocument interface, whereas XML and SVG documents implement the XMLDocumentinterface.

Element

Element

The Element interface represents an object of a Document.This interface describes methods and properties common to all kinds of elements.

Element接口表示Document中的一个对象。这个接口为所有的Element接口提供了通用的方法和属性。

Specific behaviors are described in interfaces which inherit from Element but add additional functionality(Element中的HTMLElement,SVGElement都继承自Element,并且有自己附加的方法和属性). For example, the HTMLElement interface is the base interface for HTML elements, while the SVGElement interface is the basis for all SVG elements.

Languages outside the realm of the Web platform, like XUL through the XULElementinterface, also implement it.

HTMLElement

HTMLElement

The HTMLElement interface represents any HTML element. Some elements directly implement this interface, others implement it via an interface that inherits it.

EventTarge Node Docuement Element HTMLElement 关系的更多相关文章

  1. 浅析Node与Element

    起因 起因有二: 在看winter老师的分享:<一个前端的自我修养>时,有注意到这么一幅图,里面有写childNode和children属性. 昨天有学弟问起我,能否自己定义一个所有元素节 ...

  2. 【转载】跟随 Web 标准探究DOM -- Node 与 Element 的遍历

    跟随 Web 标准探究DOM -- Node 与 Element 的遍历 这个是 Joyee 2014年更新的,可能是转战github缘故,一年多没有跟新了.这篇感觉还挺全面,就转载过来,如以前文章一 ...

  3. xml中Node和Element的区别

    本文转载自:http://blog.csdn.net/wcydiyi/article/details/4432636点击打开链接 1.元素(Element)和结点(Node)的区别:         ...

  4. 跟随 Web 标准探究DOM -- Node 与 Element 的遍历

    写在前面 这篇没有什么 WebKit 代码的分析,因为……没啥好分析的,在实现里无非就是树的(先序DFS)遍历而已,囧哈哈哈……在WebCore/dom/Node.h , WebCore/dom/Co ...

  5. DOM中的node与element的区别

    先看document的两个常见method. document.createTextNode Constructor: Text document.createElement Constructor: ...

  6. js node.children与node.childNodes与node.firstChild,node,lastChild之间的关系

    博客搬迁,给你带来的不便,敬请谅解! http://www.suanliutudousi.com/2017/11/06/js-node-children%e4%b8%8enode-childnodes ...

  7. 使用DOM进行xml文档的crud(增删改查)操作<操作详解>

    很多朋友对DOM有感冒,这里我花了一些时间写了一个小小的教程,这个能看懂,会操作了,我相信基于DOM的其它API(如JDOM,DOM4J等)一般不会有什么问题. 后附java代码,也可以下载(可点击这 ...

  8. [js]js中类的继承

    凡事总有个开端,也有个tag节点(里程碑).阶段性的划分总结,是一种对精神的慰藉,否则精神就像野马一样,会放弃,会累死. 继承: 子类原型指向父类一个实例 类的继承-模拟系统类 Object -> ...

  9. JavaScript中Element与Node的区别,children与childNodes的区别

    关于Element跟Node的区别,cilldren跟childNodes的区别很多朋友弄不清楚,本文试图让大家明白这几个概念之间的区别. Node(节点)是DOM层次结构中的任何类型的对象的通用名称 ...

随机推荐

  1. 树形DP学习笔记

    树形DP 入门模板题 poj P2342 大意就是一群职员之间有上下级关系,每个职员有一个快乐值,但是只有在他的直接上级不在场的情况下才会快乐.求举行一场聚会的快乐值之和的最大值. 求解 声明一个数组 ...

  2. c#Filestream类(文件流)

    0.创建文件流几种方法: File.Open("a.txt",FileMode.Create,FileAccess.ReadWrite); File.OpenWrite(" ...

  3. Mac下Go2Shell配合ITerm2无法定位到当前文件夹目录的解决方法

    下载最新版,这个问题在最新版已经完美解决. http://zipzapmac.com/go2shell

  4. 关于Java的权限修饰符(public,private,protected,默认friendly)

    以前对访问修饰符总是模棱两可,让自己仔细解释也是经常说不很清楚.这次要彻底的搞清楚. 现在总结如下: 一.概括总结 各个访问修饰符对不同包及其子类,非子类的访问权限 Java访问权限修饰符包含四个:p ...

  5. JS框架设计之对象扩展一种子模块

    对象扩展 说完了,对象的创建(框架的命名空间的创建)以及如何解决多库之间的命名空间冲突问题之后,接下来,就是要扩展我们的对象,来对框架进行扩展,我们需要一种新功能,将新添加的功能整合到我们定义的对象中 ...

  6. [心平气和读经典]The TCP/IP Guide(004)

    The TCP/IP Guide [Page 44, 45, 46] Structure and Organization of The TCP/IP Guide | TCP/IP指南的组织结构 Yo ...

  7. C语言位运算、移位运算 经典示例

    概述: C语言的位级运算可以运用到任何“整数”的数据类型上,如char.short.int.long.long long.或者unsigned这样的限定词.基本的位运算有与.或.非.异或等等. C语言 ...

  8. js获取网页上选中的部分,包含html代码

    function getSelectedContents(){     if (window.getSelection) { //chrome,firefox,opera         var ra ...

  9. jQuery Ajax实例 ($.ajax_$.post_$.get)

    Jquery在异步提交方面封装的很好,直接用AJAX非常麻烦,Jquery大大简化了我们的操作,不用考虑浏览器的诧异了. $.post.$.get是一些简单的方法,如果要处理复杂的逻辑,还是需要用到j ...

  10. spring boot2.0

    1. Spring boot 简介 1.1 spring boot的三大特性 组件自动装配:Web mvc, Web Flux,JDBC等 激活:@EnableAutoConfiguration 配置 ...