文档对象模型 (DOM)
文档对象模型 (DOM) 将 web 页面与到脚本或编程语言连接起来。通常是指 JavaScript,但将 HTML、SVG 或 XML 文档建模为对象并不是 JavaScript 语言的一部分。DOM 模型用一个逻辑树来表示一个文档,树的每个分支的终点都是一个节点 (node),每个节点都包含着对象 (objects)。DOM 的方法 (methods) 让你可以用特定方式操作这个树,用这些方法你可以改变文档的结构、样式或者内容。节点可以关联上事件处理器,一旦某一事件被触发了,那些事件处理器就会被执行。
这里还有一篇关于 DOM 的 介绍 。
DOM 接口
AbortController
AbortSignal
AbstractRange
Attr
CDATASection
CharacterData
Comment
CustomEvent
Document
DocumentFragment
DocumentType
DOMError
已弃用DOMException
DOMImplementation
DOMParser
DOMPoint
DOMPointReadOnly
DOMRect
DOMTokenList
Element
Event
EventTarget
HTMLCollection
MutationObserver
MutationRecord
NamedNodeMap
Node
NodeFilter
NodeIterator
NodeList
ProcessingInstruction
Range
StaticRange
Text
TextDecoder
TextEncoder
TimeRanges
TreeWalker
XMLDocument
过时的 DOM 接口
DOM 模型已经被高度简化了。为此,以下出现在 DOM level 3 或更早的规范里的接口已经被移除了。现在不是非常确定是否有一些会被重新引进,但是当前应该把它们看作废弃的,应当避免使用:
DOMConfiguration
DOMErrorHandler
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMSettableTokenList
DOMUserData
ElementTraversal
Entity
EntityReference
NameList
Notation
TypeInfo
UserDataHandler
HTML DOM
包含 HTML 的文档使用 Document
接口进行描述,该接口由 HTML 规范扩展,包含了各种特定于 HTML 的功能。特别是,Element
接口得到了增强,成为 HTMLElement
和各种子类,每个子类代表一个(或一系列密切相关的)元素。
HTML DOM API 提供对各种浏览器功能的访问,例如选项卡和窗口、CSS 样式和样式表、浏览器历史记录等。这些接口将在 HTML DOM API 中进一步讨论。
SVG 接口
SVG 元素接口
SVGAElement
SVGAltGlyphElement
已弃用SVGAltGlyphDefElement
已弃用SVGAltGlyphItemElement
已弃用SVGAnimationElement
SVGAnimateElement
SVGAnimateColorElement
已弃用SVGAnimateMotionElement
SVGAnimateTransformElement
SVGCircleElement
SVGClipPathElement
SVGComponentTransferFunctionElement
SVGCursorElement
SVGDefsElement
SVGDescElement
SVGElement
SVGEllipseElement
SVGFEBlendElement
SVGFEColorMatrixElement
SVGFEComponentTransferElement
SVGFECompositeElement
SVGFEConvolveMatrixElement
SVGFEDiffuseLightingElement
SVGFEDisplacementMapElement
SVGFEDistantLightElement
SVGFEDropShadowElement
SVGFEFloodElement
SVGFEFuncAElement
SVGFEFuncBElement
SVGFEFuncGElement
SVGFEFuncRElement
SVGFEGaussianBlurElement
SVGFEImageElement
SVGFEMergeElement
SVGFEMergeNodeElement
SVGFEMorphologyElement
SVGFEOffsetElement
SVGFEPointLightElement
SVGFESpecularLightingElement
SVGFESpotLightElement
SVGFETileElement
SVGFETurbulenceElement
SVGFilterElement
SVGFilterPrimitiveStandardAttributes
SVGFontElement
已弃用SVGFontFaceElement
已弃用SVGFontFaceFormatElement
已弃用SVGFontFaceNameElement
已弃用SVGFontFaceSrcElement
已弃用SVGFontFaceUriElement
已弃用SVGForeignObjectElement
SVGGElement
SVGGeometryElement
SVGGlyphElement
已弃用SVGGlyphRefElement
已弃用SVGGradientElement
SVGGraphicsElement
SVGHatchElement
实验性SVGHatchpathElement
实验性SVGHKernElement
已弃用SVGImageElement
SVGLinearGradientElement
SVGLineElement
SVGMarkerElement
实验性SVGMaskElement
SVGMetadataElement
SVGMissingGlyphElement
已弃用SVGMPathElement
SVGPathElement
SVGPatternElement
SVGPolylineElement
SVGPolygonElement
SVGRadialGradientElement
SVGRectElement
SVGScriptElement
SVGSetElement
SVGStopElement
SVGStyleElement
SVGSVGElement
SVGSwitchElement
SVGSymbolElement
SVGTextContentElement
SVGTextElement
SVGTextPathElement
SVGTextPositioningElement
SVGTitleElement
SVGTRefElement
已弃用SVGTSpanElement
SVGUseElement
SVGViewElement
SVGVKernElement
已弃用
SVG 数据类型接口
以下是 SVG 属性和属性定义中使用的数据类型的 DOM API。
静态类型
SVGAngle
SVGColor
已弃用SVGICCColor
已弃用SVGElementInstance
SVGElementInstanceList
SVGLength
SVGLengthList
SVGNameList
SVGNumber
SVGNumberList
SVGPaint
SVGPathSeg
已弃用SVGPathSegClosePath
已弃用SVGPathSegMovetoAbs
已弃用SVGPathSegMovetoRel
已弃用SVGPathSegLinetoAbs
已弃用SVGPathSegLinetoRel
已弃用SVGPathSegCurvetoCubicAbs
已弃用SVGPathSegCurvetoCubicRel
已弃用SVGPathSegCurvetoQuadraticAbs
已弃用SVGPathSegCurvetoQuadraticRel
已弃用SVGPathSegArcAbs
已弃用SVGPathSegArcRel
已弃用SVGPathSegLinetoHorizontalAbs
已弃用SVGPathSegLinetoHorizontalRel
已弃用SVGPathSegLinetoVerticalAbs
已弃用SVGPathSegLinetoVerticalRel
已弃用SVGPathSegCurvetoCubicSmoothAbs
已弃用SVGPathSegCurvetoCubicSmoothRel
已弃用SVGPathSegCurvetoQuadraticSmoothAbs
已弃用SVGPathSegCurvetoQuadraticSmoothRel
已弃用SVGPathSegList
已弃用SVGPoint
已弃用SVGPointList
已弃用SVGPreserveAspectRatio
SVGRect
已弃用SVGStringList
SVGTransform
SVGTransformList
动画类型
SMIL 相关接口
其他的 SVG 接口
规范
Specification |
---|
DOM Standard |