综述:

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

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. springcloud eureka注册中心 高可复用。

    1:新建两个注册中心项目(名称都为:spring-cloud-eureka,只是端口分别为8000.8001 ).两个注册中心相互注册对方. 2:两个注册中心都启动后,则对方服务列表都有对方的服务. ...

  2. python 进程和线程(代码知识部分)

    二.代码知识部分 一 multiprocessing模块介绍: python中的多线程无法利用多核优势,如果想要充分地使用多核CPU的资源(os.cpu_count()查看),在python中大部分情 ...

  3. css变量的应用

    微软在2017年3月份宣布 Edge 浏览器将支持 CSS 变量,到现在已经过去一年多了,哈哈,是不是有点后知后觉? 这个知识点是在阮一峰的日志上浏览到的,在此借用一下了..跟大家分享一下..... ...

  4. 通过view实现字段的只读、隐藏操作【转】

    原文地址:http://cn.openerp.cn/view_groups/ 在OpenERP V7视图(ir.ui.view)多了一个非常有用的字段(groups_id) 'groups_id': ...

  5. Mac下快速新建txt文件

    1.打开终端,定位到桌面 cd desktop 2.输入 vi test.txt 此时,一个txt文件就会建立在桌面上,操作vi时的提示:按[i]为输入内容,编辑好之后按[esc]键,然后输入[:wq ...

  6. 【数组】word search

    题目: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed fr ...

  7. 【Qt开发】QTime类

    QTime类为用户提供一系列时间的函数,封装的很全面,几乎满足了各种时间的需求. 常用方法介绍 1.QTime addMSecs(int ms) const 当前时间增加毫秒,ms可为负 2.QTim ...

  8. 使用vue的v-model自定义 checkbox组件

    <template id='c'> <input type="checkbox" :checked="checked" v-on:change ...

  9. 深入js之基本语法

    周末正好有空就研究了下汤姆大叔的js系列博客,虽然只是学到点皮毛,依然获益匪浅.不得不说大牛的境界岂是吾等小辈可理解. 变量: js有隐含的全局概念,意味着不声明的所有变量都是全局对象的属性. fun ...

  10. 跟着Nisy一起学习C语言

    编辑器是使用环境turboc的IDE,使用dos窗口中的edit作为编辑器,有点类似于vim:使用的是xp-sp3的虚拟机上的系统. Nisy说要有两种语言,脚本语言以及一个底层语言,比如现在我的py ...