文档对象模型 (DOM) 是 HTML 和 XML 文档的编程接口。它给文档(结构树)提供了一个结构化的表述并且定义了一种方式—程序可以对结构树进行访问,以改变文档的结构,样式和内容。 DOM 提供了一种表述形式— 将文档作为一个结构化的节点组以及包含属性和方法的对象。从本质上说,它将 web 页面和脚本或编程语言连接起来了。
尽管通常会使用 JavaScript 来访问 DOM, 但它并不是 JavaScript 的一部分,它也可以被其他语言使用,
这里有一篇可用的 DOM 介绍 。
DOM 接口
Attr
CharacterData
ChildNode
Comment
CustomEvent
Document
DocumentFragment
DocumentType
DOMError
DOMException
DOMImplementation
DOMString
DOMTimeStamp
DOMSettableTokenList
DOMStringList
DOMTokenList
Element
Event
EventTarget
HTMLCollection
MutationObserver
MutationRecord
Node
NodeFilter
NodeIterator
NodeList
ParentNode
ProcessingInstruction
Promise
PromiseResolver
Range
Text
TreeWalker
URL
Window
Worker
XMLDocument
过时的 DOM 接口
The Document Object Model is in the process of being heavily simplified. In order to achieve this the following interfaces present in the different DOM level 3 or earlier specification have been removed. It is still unclear if some may be reintroduced, but for the moment they have to be considered as obsolete and should be avoided:
HTML 接口
A document containing HTML is described using the HTMLDocument
interface. Note that the HTML specification also extends the Document
interface.
An HTMLDocument
object also gives access to browser features: the tab, or window, in which a page is drawn using the Window
interface, the Style
associated to it (usually CSS), the history of the browser relative to the context, History
, eventually a Selection
done on the document.
HTML 元素接口
HTMLAnchorElement
HTMLAppletElement
HTMLAreaElement
HTMLAudioElement
HTMLBaseElement
HTMLBodyElement
HTMLBRElement
HTMLButtonElement
HTMLCanvasElement
HTMLDataElement
HTMLDataListElement
HTMLDirectoryElement
HTMLDivElement
HTMLDListElement
HTMLElement
HTMLEmbedElement
HTMLFieldSetElement
HTMLFontElement
HTMLFormElement
HTMLFrameElement
HTMLFrameSetElement
HTMLHeadElement
HTMLHeadingElement
HTMLHtmlElement
HTMLHRElement
HTMLIFrameElement
HTMLImageElement
HTMLInputElement
HTMLKeygenElement
HTMLLabelElement
HTMLLegendElement
HTMLLIElement
HTMLLinkElement
HTMLMapElement
HTMLMediaElement
HTMLMenuElement
HTMLMetaElement
HTMLMeterElement
HTMLModElement
HTMLObjectElement
HTMLOListElement
HTMLOptGroupElement
HTMLOptionElement
HTMLOutputElement
HTMLParagraphElement
HTMLParamElement
HTMLPreElement
HTMLProgressElement
HTMLQuoteElement
HTMLScriptElement
HTMLSelectElement
HTMLSourceElement
HTMLSpanElement
HTMLStyleElement
HTMLTableElement
HTMLTableCaptionElement
HTMLTableCellElement
HTMLTableDataCellElement
HTMLTableHeaderCellElement
HTMLTableColElement
HTMLTableRowElement
HTMLTableSectionElement
HTMLTextAreaElement
HTMLTimeElement
HTMLTitleElement
HTMLTrackElement
HTMLUListElement
HTMLUnknownElement
HTMLVideoElement
其他接口
过时的 HTML 接口
SVG 接口
SVG 元素接口
SVGAElement
SVGAltGlyphElement
SVGAltGlyphDefElement
SVGAltGlyphItemElement
SVGAnimationElement
SVGAnimateElement
SVGAnimateColorElement
SVGAnimateMotionElement
SVGAnimateTransformElement
SVGCircleElement
SVGClipPathElement
SVGColorProfileElement
SVGComponentTransferFunctionElement
SVGCursorElement
SVGDefsElement
SVGDescElement
SVGElement
SVGEllipseElement
SVGFEBlendElement
SVGFEColorMatrixElement
SVGFEComponentTransferElement
SVGFECompositeElement
SVGFEConvolveMatrixElement
SVGFEDiffuseLightingElement
SVGFEDisplacementMapElement
SVGFEDistantLightElement
SVGFEFloodElement
SVGFEGaussianBlurElement
SVGFEImageElement
SVGFEMergeElement
SVGFEMergeNodeElement
SVGFEMorphologyElement
SVGFEOffsetElement
SVGFEPointLightElement
SVGFESpecularLightingElement
SVGFESpotLightElement
SVGFETileElement
SVGFETurbulenceElement
SVGFEFuncRElement
SVGFEFuncGElement
SVGFEFuncBElement
SVGFEFuncAElement
SVGFilterElement
SVGFilterPrimitiveStandardAttributes
SVGFontElement
SVGFontFaceElement
SVGFontFaceFormatElement
SVGFontFaceNameElement
SVGFontFaceSrcElement
SVGFontFaceUriElement
SVGForeignObjectElement
SVGGElement
SVGGlyphElement
SVGGlyphRefElement
SVGGradientElement
SVGHKernElement
SVGImageElement
SVGLinearGradientElement
SVGLineElement
SVGMarkerElement
SVGMaskElement
SVGMetadataElement
SVGMissingGlyphElement
SVGMPathElement
SVGPathElement
SVGPatternElement
SVGPolylineElement
SVGPolygonElement
SVGRadialGradientElement
SVGRectElement
SVGScriptElement
SVGSetElement
SVGStopElement
SVGStyleElement
SVGSVGElement
SVGSwitchElement
SVGSymbolElement
SVGTextElement
SVGTextPathElement
SVGTitleElement
SVGTRefElement
SVGTSpanElement
SVGUseElement
SVGViewElement
SVGVKernElement
SVG 数据类型接口
Here are the DOM API for data types used in the definitions of SVG properties and attributes.
注意: Starting in Gecko 5.0,the following SVG-related DOM interfaces representing lists of objects are now indexable and can be accessed like arrays; in addition, they have a length property indicating the number of items in the lists: SVGLengthList
, SVGNumberList
, SVGPathSegList
, and SVGPointList
.
Static type
Animated type
SVG 路径段接口
SVGPathSegList
SVGPathSeg
SVGPathSegArcAbs
SVGPathSegArcRel
SVGPathSegClosePath
SVGPathSegCurvetoCubicAbs
SVGPathSegCurvetoCubicRel
SVGPathSegCurvetoCubicSmoothAbs
SVGPathSegCurvetoCubicSmoothRel
SVGPathSegCurvetoQuadraticAbs
SVGPathSegCurvetoQuadraticRel
SVGPathSegCurvetoQuadraticSmoothAbs
SVGPathSegCurvetoQuadraticSmoothRel
SVGPathSegLinetoAbs
SVGPathSegLinetoHorizontalAbs
SVGPathSegLinetoHorizontalRel
SVGPathSegLinetoRel
SVGPathSegLinetoVerticalAbs
SVGPathSegLinetoVerticalRel
SVGPathSegMovetoAbs
SVGPathSegMovetoRel