HTMLIFrameElement interface

该 HTMLIFrameElement 接口提供特殊的属性和方法(除了 HTMLElement 接口之外,它还可通过继承使用它)来操作内联框架元素的布局和呈现。

MDN 参考

扩展

HTMLElement

属性

align
allow

allow HTMLIFrameElement 接口的属性指示为此<iframe>元素指定的权限策略。

MDN 参考

allowFullscreen

allowFullscreen HTMLIFrameElement 接口的属性是一个布尔值,反映 allowfullscreen iframe 元素的属性,指示是否允许 iframe 的内容使用 Element.requestFullscreen。

MDN 参考

classList

Element.classList这是一个只读属性,返回元素属性的实时 DOMTokenList 集合class。

MDN 参考

contentDocument

如果 iframe 和 iframe 的父文档相同,则返回一个 Document (即内联框架嵌套浏览上下文中的活动文档),否则返回 null。

MDN 参考

contentWindow

该 contentWindow 属性返回 HTMLIFrameElement 的 Window 对象。

MDN 参考

frameBorder
height

height HTMLIFrameElement 接口的属性返回一个字符串,该字符串反映 height iframe 元素的属性,指示框架的高度(以 CSS 像素为单位)。

MDN 参考

loading

loading HTMLIFrameElement 接口的属性是一个字符串,它向用户代理提供提示,指示 iframe 是应立即加载在页面加载时,还是仅在需要时加载。

MDN 参考

longDesc
marginHeight
marginWidth
mozRequestFullScreen
msRequestFullscreen
name

name HTMLIFrameElement 接口的属性是一个字符串值,该值反映 name iframe 元素的属性,指示元素的特定名称<iframe>。

MDN 参考

part

part Element 接口的属性表示以 DOMTokenList 形式返回的元素(即使用part特性设置)的部件标识符(s)。

MDN 参考

referrerPolicy

该 HTMLIFrameElement.referrerPolicy 属性反映资源的 HTML referrerpolicy 属性。

MDN 参考

sandbox

sandbox HTMLIFrameElement 接口的只读属性返回一个 DOMTokenList,指示对嵌套内容的行为有额外的限制。

MDN 参考

scrolling
src

HTMLIFrameElement.src反映 HTML 属性的 src A 字符串,其中包含要嵌入的内容的地址。

MDN 参考

srcdoc

srcdoc HTMLIFrameElement 的属性指定页面的内容。

MDN 参考

style

MDN 参考

textContent

MDN 参考

webkitRequestFullscreen
width

width HTMLIFrameElement 接口的属性返回一个字符串,该width字符串反映 iframe 元素的属性,以 CSS 像素表示框架的宽度。

MDN 参考

继承属性

accessKey

该 HTMLElement.accessKey 属性设置用户可以按下的击键键跳转到给定元素。

MDN 参考

accessKeyLabel

HTMLElement.accessKeyLabel只读属性返回一个字符串,该字符串包含元素的浏览器分配的访问键(如果有);否则返回空字符串。

MDN 参考

ariaActiveDescendantElement

MDN 参考

ariaAtomic

MDN 参考

ariaAutoComplete

MDN 参考

ariaBrailleLabel

MDN 参考

ariaBrailleRoleDescription

MDN 参考

ariaBusy

MDN 参考

ariaChecked

MDN 参考

ariaColCount

MDN 参考

ariaColIndex

MDN 参考

ariaColIndexText

MDN 参考

ariaColSpan

MDN 参考

ariaControlsElements

MDN 参考

ariaCurrent

MDN 参考

ariaDescribedByElements

MDN 参考

ariaDescription

MDN 参考

ariaDetailsElements

MDN 参考

ariaDisabled

MDN 参考

ariaErrorMessageElements

MDN 参考

ariaExpanded

MDN 参考

ariaFlowToElements

MDN 参考

ariaHasPopup

MDN 参考

ariaHidden

MDN 参考

ariaInvalid

MDN 参考

ariaKeyShortcuts

MDN 参考

ariaLabel

MDN 参考

ariaLabelledByElements

MDN 参考

ariaLevel

MDN 参考

ariaLive

MDN 参考

ariaModal

MDN 参考

ariaMultiLine

MDN 参考

ariaMultiSelectable

MDN 参考

ariaOrientation

MDN 参考

ariaOwnsElements

MDN 参考

ariaPlaceholder

MDN 参考

ariaPosInSet

MDN 参考

ariaPressed

MDN 参考

ariaReadOnly

MDN 参考

ariaRelevant

MDN 参考

ariaRequired

MDN 参考

ariaRoleDescription

MDN 参考

ariaRowCount

MDN 参考

ariaRowIndex

MDN 参考

ariaRowIndexText

MDN 参考

ariaRowSpan

MDN 参考

ariaSelected

MDN 参考

ariaSetSize

MDN 参考

ariaSort

MDN 参考

ariaValueMax

MDN 参考

ariaValueMin

MDN 参考

ariaValueNow

MDN 参考

ariaValueText

MDN 参考

assignedSlot

MDN 参考

attributes

该 Element.attributes 属性返回已注册到指定节点的所有属性节点的实时集合。

MDN 参考

attributeStyleMap

MDN 参考

ATTRIBUTE_NODE
autocapitalize

autocapitalize HTMLElement 接口的属性表示用户输入的元素大写行为。

MDN 参考

autocorrect

autocorrect HTMLElement 接口的属性控制是否为拼写和/或标点错误启用了可编辑文本的自动更正。

MDN 参考

autofocus

MDN 参考

baseURI

Node 接口的只读 baseURI 属性返回包含节点的文档的绝对基 URL。

MDN 参考

CDATA_SECTION_NODE

节点是 CDATASection 节点。

childElementCount

MDN 参考

childNodes

Node 接口的只读 childNodes 属性返回分配了第一个子节点的实时索引 0。

MDN 参考

children

返回子元素。

MDN 参考

className

className指定元素的属性。

MDN 参考

clientHeight

clientHeight对于没有 CSS 或内联布局框的元素,元素接口的只读属性为零;否则,它是元素的内部高度(以像素为单位)。

MDN 参考

clientLeft

clientLeft Element 接口的只读属性返回元素左边框的宽度(以像素为单位)。

MDN 参考

clientTop

clientTop Element 接口的只读属性返回元素上边框的宽度(以像素为单位)。

MDN 参考

clientWidth

元素 clientWidth 接口的只读属性对于无 CSS 的内联元素和元素为零;否则,它是元素的内部宽度(以像素为单位)。

MDN 参考

COMMENT_NODE

节点是注释节点。

contentEditable

MDN 参考

currentCSSZoom

currentCSSZoom Element 接口的只读属性提供元素的“有效”CSSzoom,同时考虑到应用于元素及其所有父元素的缩放。

MDN 参考

dataset

MDN 参考

dir

该 HTMLElement.dir 属性指示当前元素内容的文本写入方向性。

MDN 参考

DOCUMENT_FRAGMENT_NODE

节点是 DocumentFragment 节点。

DOCUMENT_NODE

节点是文档。

DOCUMENT_POSITION_CONTAINED_BY

当其他节点是节点的后代时设置。

DOCUMENT_POSITION_CONTAINS

当其他节点是节点的上级时设置。

DOCUMENT_POSITION_DISCONNECTED

当节点和其他节点不在同一树中时设置。

DOCUMENT_POSITION_FOLLOWING

当其他节点位于以下节点时设置。

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING

设置其他节点之前的节点。

DOCUMENT_TYPE_NODE

node 是 doctype。

draggable

draggable HTMLElement 接口的属性获取并设置一个布尔基元,指示元素是否可拖动。

MDN 参考

ELEMENT_NODE

node 是一个元素。

enterKeyHint

MDN 参考

ENTITY_NODE
ENTITY_REFERENCE_NODE
firstChild

Node 接口的只读 firstChild 属性返回节点在树中的第一个子级,或者 null 节点没有子级。

MDN 参考

firstElementChild

返回作为元素的第一个子级,否则返回 null。

MDN 参考

hidden

HTMLElement 属性 hidden 反映元素 hidden 属性的值。

MDN 参考

id

id Element 接口的属性表示元素的标识符,反映id全局属性。

MDN 参考

inert

HTMLElement 属性 inert 反映元素 inert 属性的值。

MDN 参考

innerHTML

innerHTML Element 接口的属性获取或设置元素中包含的 HTML 或 XML 标记。

MDN 参考

innerText

innerText HTMLElement 接口的属性表示节点及其后代的呈现文本内容。

MDN 参考

inputMode

MDN 参考

isConnected

Node 接口的只读 isConnected 属性返回一个布尔值,指示节点是直接还是间接地连接到 Document 对象。

MDN 参考

isContentEditable

MDN 参考

lang

lang HTMLElement 接口的属性以 MISSING 的形式指示元素属性值和文本内容的基语言:RFC(5646,“BCP 47 语言标识符标记”)]。

MDN 参考

lastChild

Node 接口的只读 lastChild 属性返回节点的最后一个子级,或者 null 如果没有子节点。

MDN 参考

lastElementChild

返回作为元素的最后一个子级,否则返回 null。

MDN 参考

localName

Element.localName只读属性返回元素的限定名称的本地部分。

MDN 参考

namespaceURI

Element.namespaceURI只读属性返回元素的命名空间 URI,或者null元素不在命名空间中。

MDN 参考

nextElementSibling

返回作为元素的第一个同级,否则返回 null。

MDN 参考

nextSibling

Node 接口的只读 nextSibling 属性将紧跟在其父节点的 Node.childNodes 中的指定节点之后返回节点,或者如果指定节点是父元素中的最后一个子节点,则返回 null 该节点。

MDN 参考

nodeName

Node 的只读 nodeName 属性将当前节点的名称作为字符串返回。

MDN 参考

nodeType

Node 接口的只读 nodeType 属性是一个整数,用于标识节点是什么。

MDN 参考

nodeValue

nodeValue Node 接口的属性返回或设置当前节点的值。

MDN 参考

nonce

MDN 参考

NOTATION_NODE
offsetHeight

offsetHeight HTMLElement 接口的只读属性以整数形式返回元素的高度,包括垂直填充和边框。

MDN 参考

offsetLeft

offsetLeft HTMLElement 接口的只读属性返回当前元素左上角在 HTMLElement.offsetParent 节点中向左偏移的像素数。

MDN 参考

offsetParent

HTMLElement.offsetParent只读属性返回对位于包含层次结构中最接近的上级元素的元素的引用。

MDN 参考

offsetTop

offsetTop HTMLElement 接口的只读属性返回从当前元素的外部边框(包括其边距)到 HTMLelement.offsetParent 的上填充边缘(最接近定位的上级元素)的距离。

MDN 参考

offsetWidth

offsetWidth HTMLElement 接口的只读属性将元素的布局宽度作为整数返回。

MDN 参考

onabort

MDN 参考

onanimationcancel

MDN 参考

onanimationend

MDN 参考

onanimationiteration

MDN 参考

onanimationstart

MDN 参考

onauxclick

MDN 参考

onbeforeinput

MDN 参考

onbeforematch

MDN 参考

onbeforetoggle

MDN 参考

onblur

MDN 参考

oncancel

MDN 参考

oncanplay

MDN 参考

oncanplaythrough

MDN 参考

onchange

MDN 参考

onclick

MDN 参考

onclose

MDN 参考

oncontextlost

MDN 参考

oncontextmenu

MDN 参考

oncontextrestored

MDN 参考

oncopy

MDN 参考

oncuechange

MDN 参考

oncut

MDN 参考

ondblclick

MDN 参考

ondrag

MDN 参考

ondragend

MDN 参考

ondragenter

MDN 参考

ondragleave

MDN 参考

ondragover

MDN 参考

ondragstart

MDN 参考

ondrop

MDN 参考

ondurationchange

MDN 参考

onemptied

MDN 参考

onended

MDN 参考

onerror

MDN 参考

onfocus

MDN 参考

onformdata

MDN 参考

onfullscreenchange

MDN 参考

onfullscreenerror

MDN 参考

ongotpointercapture

MDN 参考

oninput

MDN 参考

oninvalid

MDN 参考

onkeydown

MDN 参考

onkeypress
onkeyup

MDN 参考

onload

MDN 参考

onloadeddata

MDN 参考

onloadedmetadata

MDN 参考

onloadstart

MDN 参考

onlostpointercapture

MDN 参考

onmousedown

MDN 参考

onmouseenter

MDN 参考

onmouseleave

MDN 参考

onmousemove

MDN 参考

onmouseout

MDN 参考

onmouseover

MDN 参考

onmouseup

MDN 参考

onpaste

MDN 参考

onpause

MDN 参考

onplay

MDN 参考

onplaying

MDN 参考

onpointercancel

MDN 参考

onpointerdown

MDN 参考

onpointerenter

MDN 参考

onpointerleave

MDN 参考

onpointermove

MDN 参考

onpointerout

MDN 参考

onpointerover

MDN 参考

onpointerrawupdate

仅在安全上下文中可用。

MDN 参考

onpointerup

MDN 参考

onprogress

MDN 参考

onratechange

MDN 参考

onreset

MDN 参考

onresize

MDN 参考

onscroll

MDN 参考

onscrollend

MDN 参考

onsecuritypolicyviolation

MDN 参考

onseeked

MDN 参考

onseeking

MDN 参考

onselect

MDN 参考

onselectionchange

MDN 参考

onselectstart

MDN 参考

onslotchange

MDN 参考

onstalled

MDN 参考

onsubmit

MDN 参考

onsuspend

MDN 参考

ontimeupdate

MDN 参考

ontoggle

MDN 参考

ontouchcancel

MDN 参考

ontouchend

MDN 参考

ontouchmove

MDN 参考

ontouchstart

MDN 参考

ontransitioncancel

MDN 参考

ontransitionend

MDN 参考

ontransitionrun

MDN 参考

ontransitionstart

MDN 参考

onvolumechange

MDN 参考

onwaiting

MDN 参考

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel

MDN 参考

outerHTML

outerHTML Element DOM 接口的属性获取描述元素(包括其后代)的序列化 HTML 片段。

MDN 参考

outerText

outerText HTMLElement 接口的属性返回与 HTMLElement.innerText 相同的值。

MDN 参考

ownerDocument

Node 接口的只读 ownerDocument 属性返回节点的顶级文档对象。

MDN 参考

parentElement

Node 接口的只读 parentElement 属性返回 DOM 节点的父元素,或者 null 节点没有父元素,或者其父元素不是 DOM 元素。

MDN 参考

parentNode

Node 接口的只读 parentNode 属性返回 DOM 树中指定节点的父级。

MDN 参考

popover

popover HTMLElement 接口的属性通过 JavaScript('auto'或'hint''manual')获取和设置元素的弹出状态,并可用于功能检测。

MDN 参考

prefix

Element.prefix只读属性返回指定元素的命名空间前缀,或者null未指定前缀。

MDN 参考

previousElementSibling

返回前一个是元素的同级,否则返回 null。

MDN 参考

previousSibling

Node 接口的只读 previousSibling 属性返回紧邻其父节点中指定节点的前面,或者 null 指定节点是该列表中的第一个节点。

MDN 参考

PROCESSING_INSTRUCTION_NODE

节点是 ProcessingInstruction 节点。

role

MDN 参考

scrollHeight

scrollHeight Element 接口的只读属性是对元素内容高度的度量,包括由于溢出而在屏幕上不可见的内容。

MDN 参考

scrollLeft

scrollLeft Element 接口的属性获取或设置元素内容从其左边缘滚动的像素数。

MDN 参考

scrollTop

scrollTop Element 接口的属性获取或设置元素内容从其上边缘滚动的像素数。

MDN 参考

scrollWidth

scrollWidth元素接口的只读属性是对元素内容的宽度的度量,包括由于溢出而在屏幕上不可见的内容。

MDN 参考

shadowRoot

Element.shadowRoot只读属性表示元素托管的阴影根。

MDN 参考

slot

slot Element 接口的属性返回插入元素的阴影 DOM 槽的名称。

MDN 参考

spellcheck

spellcheck HTMLElement 接口的属性表示控制拼写检查提示的布尔值。

MDN 参考

tabIndex

MDN 参考

tagName

tagName Element 接口的只读属性返回调用元素的标记名称。

MDN 参考

TEXT_NODE

节点是文本节点。

title

该 HTMLElement.title 属性表示元素的标题:鼠标位于节点上方时,通常显示在“工具提示”弹出窗口中的文本。

MDN 参考

translate

translate HTMLElement 接口的属性指示元素的属性值及其文本节点子级的值是在本地化页面时转换的,还是是否保持不变。

MDN 参考

writingSuggestions

writingSuggestions HTMLElement 接口的属性是一个字符串,指示是否应在元素范围内启用浏览器提供的写入建议。

MDN 参考

继承的方法

after((string | Node)[])

在节点之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

animate(Keyframe[] | PropertyIndexedKeyframes | null, number | KeyframeAnimationOptions)

MDN 参考

append((string | Node)[])

在节点的最后一个子级之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

appendChild<T>(T)

appendChild() Node 接口的方法将节点添加到指定父节点的子节点列表的末尾。

MDN 参考

attachInternals()

该方法 HTMLElement.attachInternals() 返回 ElementInternals 对象。

MDN 参考

attachShadow(ShadowRootInit)

该方法 Element.attachShadow() 将阴影 DOM 树附加到指定的元素,并返回对其 ShadowRoot 的引用。

MDN 参考

before((string | Node)[])

在节点之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

blur()

MDN 参考

checkVisibility(CheckVisibilityOptions)

checkVisibility()元素接口的方法检查元素是否可见。

MDN 参考

click()

该方法 HTMLElement.click() 模拟鼠标单击元素。

MDN 参考

cloneNode(boolean)

Node cloneNode() 接口的方法返回调用此方法的节点的副本。

MDN 参考

closest<E>(string)
closest<K>(K)

closest()元素接口的方法遍历元素及其父元素(指向文档根目录),直到找到与指定 CSS 选择器匹配的节点。

MDN 参考

closest<K>(K)
closest<K>(K)
compareDocumentPosition(Node)

Node compareDocumentPosition() 接口的方法报告其自变量节点相对于调用它的节点的位置。

MDN 参考

computedStyleMap()

computedStyleMap() Element 接口的方法返回 StylePropertyMapReadOnly 接口,该接口提供 CSS 声明块的只读表示形式,这是 CSSStyleDeclaration 的替代方法。

MDN 参考

contains(Node | null)

contains() Node 接口的方法返回一个布尔值,该值指示节点是否是给定节点的后代,即节点本身、其直接子级之一(Node.childNodes)、子级的直接子级之一等。

MDN 参考

dispatchEvent(Event)

dispatchEvent() EventTarget 的方法按适当的顺序将事件发送到对象(同步)调用受影响的事件侦听器。

MDN 参考

focus(FocusOptions)

MDN 参考

getAnimations(GetAnimationsOptions)

MDN 参考

getAttribute(string)

getAttribute()元素的方法。

MDN 参考

getAttributeNames()

getAttributeNames()数组的方法。

MDN 参考

getAttributeNode(string)

以 Attr 节点的形式返回指定元素的指定属性。

MDN 参考

getAttributeNodeNS(string | null, string)

getAttributeNodeNS() Element 接口的方法返回元素的命名空间 Attr 节点。

MDN 参考

getAttributeNS(string | null, string)

getAttributeNS() Element 接口的方法返回具有指定命名空间和名称的属性的字符串值。

MDN 参考

getBoundingClientRect()

该方法 Element.getBoundingClientRect() 返回相对于视区的位置。

MDN 参考

getClientRects()

getClientRects() Element 接口的方法返回 DOMRect 对象的集合,这些对象指示客户端中每个 CSS 边框框的边界矩形。

MDN 参考

getElementsByClassName(string)

Element 方法 getElementsByClassName() 返回实时指定的类名或名称。

MDN 参考

getElementsByTagName(string)
getElementsByTagName<K>(K)

该方法 Element.getElementsByTagName() 返回指定元素的实时 All 后代,但不会搜索元素本身。

MDN 参考

getElementsByTagName<K>(K)
getElementsByTagName<K>(K)
getElementsByTagName<K>(K)
getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML", string)
getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

该方法 Element.getElementsByTagNameNS() 返回一个具有给定标记名称的元素的实时 HTMLCollection,该标记名称属于给定命名空间。

MDN 参考

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)
getElementsByTagNameNS(string | null, string)
getHTML(GetHTMLOptions)

getHTML()元素接口的方法用于将元素的 DOM 序列化为 HTML 字符串。

MDN 参考

getRootNode(GetRootNodeOptions)

getRootNode() Node 接口的方法返回上下文对象的根,该根(可选)包括影子根(如果可用)。

MDN 参考

hasAttribute(string)

该方法 Element.hasAttribute() 返回一个 布尔 值,该值指示指定的元素是否具有指定的属性。

MDN 参考

hasAttributeNS(string | null, string)

hasAttributeNS() Element 接口的方法返回一个布尔值,该值指示当前元素是否具有具有指定命名空间的指定属性。

MDN 参考

hasAttributes()

hasAttributes() Element 接口的方法返回一个布尔值,该值指示当前元素是否具有任何属性。

MDN 参考

hasChildNodes()

Node hasChildNodes() 接口的方法返回一个布尔值,该值指示给定节点是否具有子节点。

MDN 参考

hasPointerCapture(number)

hasPointerCapture()由给定指针 ID 标识的指针的指针捕获方法。

MDN 参考

hidePopover()

hidePopover() HTMLElement 接口的方法通过从顶层删除具有有效属性的弹出元素(即具有有效popover属性的元素)并设置display: none其样式来隐藏该元素。

MDN 参考

insertAdjacentElement(InsertPosition, Element)

对其 insertAdjacentElement() 调用的元素的相对方法。

MDN 参考

insertAdjacentHTML(InsertPosition, string)

insertAdjacentHTML()生成的节点的方法位于指定位置的 DOM 树中。

MDN 参考

insertAdjacentText(InsertPosition, string)

元素 insertAdjacentText() 接口的方法,给定相对位置和字符串,在给定位置相对于从中调用的元素插入一个新的文本节点。

MDN 参考

insertBefore<T>(T, Node | null)

Node insertBefore() 接口的方法在 引用节点 之前插入节点作为指定 父节点的子节点。

MDN 参考

isDefaultNamespace(string | null)

isDefaultNamespace() Node 接口的方法接受命名空间 URI 作为参数。

MDN 参考

isEqualNode(Node | null)

isEqualNode() Node 接口的方法测试两个节点是否相等。

MDN 参考

isSameNode(Node | null)

Node isSameNode() 接口的方法是严格相等运算符的 === 旧别名。

MDN 参考

lookupNamespaceURI(string | null)

Node lookupNamespaceURI() 接口的方法采用前缀作为参数,并返回与给定节点上关联的命名空间 URI(如果 null 找不到)。

MDN 参考

lookupPrefix(string | null)

Node lookupPrefix() 接口的方法返回一个字符串,其中包含给定命名空间 URI 的前缀(如果存在)以及 null 不存在的字符串。

MDN 参考

matches(string)

matches()元素接口的方法测试是否由指定的 CSS 选择器选择该元素。

MDN 参考

normalize()

Node normalize() 接口的方法将指定节点及其所有子树都放入 规范化 形式。

MDN 参考

prepend((string | Node)[])

在节点的第一个子级之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

querySelector<E>(string)
querySelector<K>(K)

返回与选择器匹配的节点后代的第一个元素。

MDN 参考

querySelector<K>(K)
querySelector<K>(K)
querySelector<K>(K)
querySelectorAll<E>(string)
querySelectorAll<K>(K)

返回与选择器匹配的节点的所有元素后代。

MDN 参考

querySelectorAll<K>(K)
querySelectorAll<K>(K)
querySelectorAll<K>(K)
releasePointerCapture(number)

releasePointerCapture()以前为特定 (PointerEvent) 指针设置的方法。

MDN 参考

remove()

删除节点。

MDN 参考

removeAttribute(string)

Element 方法 removeAttribute() 从元素中删除具有指定名称的属性。

MDN 参考

removeAttributeNode(Attr)

removeAttributeNode() Element 接口的方法从元素中删除指定的 Attr 节点。

MDN 参考

removeAttributeNS(string | null, string)

removeAttributeNS()如果使用 HTML,并且不需要将请求的属性指定为特定命名空间的一部分,请改用 Element.removeAttribute() 方法。

MDN 参考

removeChild<T>(T)

removeChild() Node 接口的方法从 DOM 中删除子节点,并返回已删除的节点。

MDN 参考

replaceChild<T>(Node, T)

replaceChild() Node 接口的方法替换给定(父)节点中的子节点。

MDN 参考

replaceChildren((string | Node)[])

将节点的所有子级替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

replaceWith((string | Node)[])

将节点替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

requestFullscreen(FullscreenOptions)

该方法 Element.requestFullscreen() 发出异步请求以全屏模式显示元素。

MDN 参考

requestPointerLock(PointerLockOptions)

使用 requestPointerLock() Element 接口的方法,可以异步请求在给定元素上锁定指针。

MDN 参考

scroll(number, number)
scroll(ScrollToOptions)

scroll() Element 接口的方法将元素滚动到给定元素内的一组特定坐标。

MDN 参考

scrollBy(number, number)
scrollBy(ScrollToOptions)

scrollBy() Element 接口的方法按给定的量滚动元素。

MDN 参考

scrollIntoView(boolean | ScrollIntoViewOptions)

Element 接口 scrollIntoView() 的方法滚动元素的上级容器,以便调用的 scrollIntoView() 元素对用户可见。

MDN 参考

scrollTo(number, number)
scrollTo(ScrollToOptions)

scrollTo()元素接口的方法滚动到给定元素内的一组特定坐标。

MDN 参考

setAttribute(string, string)

setAttribute() Element 接口的方法设置指定元素上的特性的值。

MDN 参考

setAttributeNode(Attr)

setAttributeNode() Element 接口的方法将新的 Attr 节点添加到指定的元素。

MDN 参考

setAttributeNodeNS(Attr)

setAttributeNodeNS() Element 接口的方法将新的命名空间 Attr 节点添加到元素。

MDN 参考

setAttributeNS(string | null, string, string)

setAttributeNS 添加新属性或更改具有给定命名空间和名称的属性的值。

MDN 参考

setHTMLUnsafe(string)

setHTMLUnsafe() Element 接口的方法用于将 HTML 字符串分析为 DocumentFragment,(可选)筛选掉不需要的元素和属性,以及不属于上下文的元素,然后使用它替换 DOM 中的元素子树。

MDN 参考

setPointerCapture(number)

setPointerCapture()未来指针事件的捕获目标的方法。

MDN 参考

showPopover()

showPopover() HTMLElement 接口的方法通过将其添加到顶层来显示一个Popover_API元素(即具有有效popover属性的元素)。

MDN 参考

toggleAttribute(string, boolean)

在 toggleAttribute() 给定元素上添加当前和添加它的方法( 如果不存在)。

MDN 参考

togglePopover(boolean)

togglePopover() HTMLElement 接口的方法在隐藏状态和显示状态之间切换Popover_API元素(即具有有效popover属性)。

MDN 参考

webkitMatchesSelector(string)

属性详细信息

align

警告

现已弃用此 API。

align: string

属性值

string

allow

allow HTMLIFrameElement 接口的属性指示为此<iframe>元素指定的权限策略。

MDN 参考

allow: string

属性值

string

allowFullscreen

allowFullscreen HTMLIFrameElement 接口的属性是一个布尔值,反映 allowfullscreen iframe 元素的属性,指示是否允许 iframe 的内容使用 Element.requestFullscreen。

MDN 参考

allowFullscreen: boolean

属性值

boolean

classList

Element.classList这是一个只读属性,返回元素属性的实时 DOMTokenList 集合class。

MDN 参考

DOMTokenList classList

属性值

DOMTokenList

contentDocument

如果 iframe 和 iframe 的父文档相同,则返回一个 Document (即内联框架嵌套浏览上下文中的活动文档),否则返回 null。

MDN 参考

contentDocument: Document | null

属性值

Document | null

contentWindow

该 contentWindow 属性返回 HTMLIFrameElement 的 Window 对象。

MDN 参考

contentWindow: Window | null

属性值

Window | null

frameBorder

警告

现已弃用此 API。

frameBorder: string

属性值

string

height

height HTMLIFrameElement 接口的属性返回一个字符串,该字符串反映 height iframe 元素的属性,指示框架的高度(以 CSS 像素为单位)。

MDN 参考

height: string

属性值

string

loading

loading HTMLIFrameElement 接口的属性是一个字符串,它向用户代理提供提示,指示 iframe 是应立即加载在页面加载时,还是仅在需要时加载。

MDN 参考

loading: "eager" | "lazy"

属性值

"eager" | "lazy"

longDesc

警告

现已弃用此 API。

longDesc: string

属性值

string

marginHeight

警告

现已弃用此 API。

marginHeight: string

属性值

string

marginWidth

警告

现已弃用此 API。

marginWidth: string

属性值

string

mozRequestFullScreen

mozRequestFullScreen: Function

属性值

Function

msRequestFullscreen

msRequestFullscreen: Function

属性值

Function

name

name HTMLIFrameElement 接口的属性是一个字符串值,该值反映 name iframe 元素的属性,指示元素的特定名称<iframe>。

MDN 参考

name: string

属性值

string

part

part Element 接口的属性表示以 DOMTokenList 形式返回的元素(即使用part特性设置)的部件标识符(s)。

MDN 参考

DOMTokenList part

属性值

DOMTokenList

referrerPolicy

该 HTMLIFrameElement.referrerPolicy 属性反映资源的 HTML referrerpolicy 属性。

MDN 参考

referrerPolicy: ReferrerPolicy

属性值

ReferrerPolicy

sandbox

sandbox HTMLIFrameElement 接口的只读属性返回一个 DOMTokenList,指示对嵌套内容的行为有额外的限制。

MDN 参考

DOMTokenList sandbox

属性值

DOMTokenList

scrolling

警告

现已弃用此 API。

scrolling: string

属性值

string

src

HTMLIFrameElement.src反映 HTML 属性的 src A 字符串,其中包含要嵌入的内容的地址。

MDN 参考

src: string

属性值

string

srcdoc

srcdoc HTMLIFrameElement 的属性指定页面的内容。

MDN 参考

srcdoc: string

属性值

string

style

MDN 参考

CSSStyleDeclaration style

属性值

CSSStyleDeclaration

textContent

MDN 参考

string textContent

属性值

string

webkitRequestFullscreen

webkitRequestFullscreen: () => void

属性值

() => void

width

width HTMLIFrameElement 接口的属性返回一个字符串,该width字符串反映 iframe 元素的属性,以 CSS 像素表示框架的宽度。

MDN 参考

width: string

属性值

string

继承属性详细信息

accessKey

该 HTMLElement.accessKey 属性设置用户可以按下的击键键跳转到给定元素。

MDN 参考

accessKey: string

属性值

string

继承自 HTMLElement.accessKey

accessKeyLabel

HTMLElement.accessKeyLabel只读属性返回一个字符串,该字符串包含元素的浏览器分配的访问键(如果有);否则返回空字符串。

MDN 参考

accessKeyLabel: string

属性值

string

继承自 HTMLElement.accessKeyLabel

ariaActiveDescendantElement

MDN 参考

ariaActiveDescendantElement: Element | null

属性值

Element | null

继承自 HTMLElement.ariaActiveDescendantElement

ariaAtomic

MDN 参考

ariaAtomic: string | null

属性值

string | null

继承自 HTMLElement.ariaAtomic

ariaAutoComplete

MDN 参考

ariaAutoComplete: string | null

属性值

string | null

继承自 HTMLElement.ariaAutoComplete

ariaBrailleLabel

MDN 参考

ariaBrailleLabel: string | null

属性值

string | null

继承自 HTMLElement.ariaBrailleLabel

ariaBrailleRoleDescription

MDN 参考

ariaBrailleRoleDescription: string | null

属性值

string | null

继承自 HTMLElement.ariaBrailleRoleDescription

ariaBusy

MDN 参考

ariaBusy: string | null

属性值

string | null

继承自 HTMLElement.ariaBusy

ariaChecked

MDN 参考

ariaChecked: string | null

属性值

string | null

继承自 HTMLElement.ariaChecked

ariaColCount

MDN 参考

ariaColCount: string | null

属性值

string | null

继承自 HTMLElement.ariaColCount

ariaColIndex

MDN 参考

ariaColIndex: string | null

属性值

string | null

继承自 HTMLElement.ariaColIndex

ariaColIndexText

MDN 参考

ariaColIndexText: string | null

属性值

string | null

继承自 HTMLElement.ariaColIndexText

ariaColSpan

MDN 参考

ariaColSpan: string | null

属性值

string | null

继承自 HTMLElement.ariaColSpan

ariaControlsElements

MDN 参考

ariaControlsElements: (readonly Element[]) | null

属性值

(readonly Element[]) | null

继承自 HTMLElement.ariaControlsElements

ariaCurrent

MDN 参考

ariaCurrent: string | null

属性值

string | null

继承自 HTMLElement.ariaCurrent

ariaDescribedByElements

MDN 参考

ariaDescribedByElements: (readonly Element[]) | null

属性值

(readonly Element[]) | null

继承自 HTMLElement.ariaDescribedByElements

ariaDescription

MDN 参考

ariaDescription: string | null

属性值

string | null

继承自 HTMLElement.ariaDescription

ariaDetailsElements

MDN 参考

ariaDetailsElements: (readonly Element[]) | null

属性值

(readonly Element[]) | null

继承自 HTMLElement.ariaDetailsElements

ariaDisabled

MDN 参考

ariaDisabled: string | null

属性值

string | null

继承自 HTMLElement.ariaDisabled

ariaErrorMessageElements

MDN 参考

ariaErrorMessageElements: (readonly Element[]) | null

属性值

(readonly Element[]) | null

继承自 HTMLElement.ariaErrorMessageElements

ariaExpanded

MDN 参考

ariaExpanded: string | null

属性值

string | null

继承自 HTMLElement.ariaExpanded

ariaFlowToElements

MDN 参考

ariaFlowToElements: (readonly Element[]) | null

属性值

(readonly Element[]) | null

继承自 HTMLElement.ariaFlowToElements

ariaHasPopup

MDN 参考

ariaHasPopup: string | null

属性值

string | null

继承自 HTMLElement.ariaHasPopup

ariaHidden

MDN 参考

ariaHidden: string | null

属性值

string | null

继承自 HTMLElement.ariaHidden

ariaInvalid

MDN 参考

ariaInvalid: string | null

属性值

string | null

继承自 HTMLElement.ariaInvalid

ariaKeyShortcuts

MDN 参考

ariaKeyShortcuts: string | null

属性值

string | null

继承自 HTMLElement.ariaKeyShortcuts

ariaLabel

MDN 参考

ariaLabel: string | null

属性值

string | null

继承自 HTMLElement.ariaLabel

ariaLabelledByElements

MDN 参考

ariaLabelledByElements: (readonly Element[]) | null

属性值

(readonly Element[]) | null

继承自 HTMLElement.ariaLabelledByElements

ariaLevel

MDN 参考

ariaLevel: string | null

属性值

string | null

继承自 HTMLElement.ariaLevel

ariaLive

MDN 参考

ariaLive: string | null

属性值

string | null

继承自 HTMLElement.ariaLive

ariaModal

MDN 参考

ariaModal: string | null

属性值

string | null

继承自 HTMLElement.ariaModal

ariaMultiLine

MDN 参考

ariaMultiLine: string | null

属性值

string | null

继承自 HTMLElement.ariaMultiLine

ariaMultiSelectable

MDN 参考

ariaMultiSelectable: string | null

属性值

string | null

继承自 HTMLElement.ariaMultiSelectable

ariaOrientation

MDN 参考

ariaOrientation: string | null

属性值

string | null

继承自 HTMLElement.ariaOrientation

ariaOwnsElements

MDN 参考

ariaOwnsElements: (readonly Element[]) | null

属性值

(readonly Element[]) | null

继承自 HTMLElement.ariaOwnsElements

ariaPlaceholder

MDN 参考

ariaPlaceholder: string | null

属性值

string | null

继承自 HTMLElement.ariaPlaceholder

ariaPosInSet

MDN 参考

ariaPosInSet: string | null

属性值

string | null

继承自 HTMLElement.ariaPosInSet

ariaPressed

MDN 参考

ariaPressed: string | null

属性值

string | null

继承自 HTMLElement.ariaPressed

ariaReadOnly

MDN 参考

ariaReadOnly: string | null

属性值

string | null

继承自 HTMLElement.ariaReadOnly

ariaRelevant

MDN 参考

ariaRelevant: string | null

属性值

string | null

继承自 HTMLElement.ariaRelevant

ariaRequired

MDN 参考

ariaRequired: string | null

属性值

string | null

继承自 HTMLElement.ariaRequired

ariaRoleDescription

MDN 参考

ariaRoleDescription: string | null

属性值

string | null

继承自 HTMLElement.ariaRoleDescription

ariaRowCount

MDN 参考

ariaRowCount: string | null

属性值

string | null

继承自 HTMLElement.ariaRowCount

ariaRowIndex

MDN 参考

ariaRowIndex: string | null

属性值

string | null

继承自 HTMLElement.ariaRowIndex

ariaRowIndexText

MDN 参考

ariaRowIndexText: string | null

属性值

string | null

继承自 HTMLElement.ariaRowIndexText

ariaRowSpan

MDN 参考

ariaRowSpan: string | null

属性值

string | null

继承自 HTMLElement.ariaRowSpan

ariaSelected

MDN 参考

ariaSelected: string | null

属性值

string | null

继承自 HTMLElement.ariaSelected

ariaSetSize

MDN 参考

ariaSetSize: string | null

属性值

string | null

继承自 HTMLElement.ariaSetSize

ariaSort

MDN 参考

ariaSort: string | null

属性值

string | null

继承自 HTMLElement.ariaSort

ariaValueMax

MDN 参考

ariaValueMax: string | null

属性值

string | null

继承自 HTMLElement.ariaValueMax

ariaValueMin

MDN 参考

ariaValueMin: string | null

属性值

string | null

继承自 HTMLElement.ariaValueMin

ariaValueNow

MDN 参考

ariaValueNow: string | null

属性值

string | null

继承自 HTMLElement.ariaValueNow

ariaValueText

MDN 参考

ariaValueText: string | null

属性值

string | null

继承自 HTMLElement.ariaValueText

assignedSlot

MDN 参考

assignedSlot: HTMLSlotElement | null

属性值

HTMLSlotElement | null

继承自 HTMLElement.assignedSlot

attributes

该 Element.attributes 属性返回已注册到指定节点的所有属性节点的实时集合。

MDN 参考

attributes: NamedNodeMap

属性值

NamedNodeMap

继承自 HTMLElement.attributes

attributeStyleMap

MDN 参考

attributeStyleMap: StylePropertyMap

属性值

StylePropertyMap

继承自 HTMLElement.attributeStyleMap

ATTRIBUTE_NODE

ATTRIBUTE_NODE: 2

属性值

2

继承自 HTMLElement.ATTRIBUTE_NODE 的

autocapitalize

autocapitalize HTMLElement 接口的属性表示用户输入的元素大写行为。

MDN 参考

autocapitalize: string

属性值

string

继承自 HTMLElement.autocapitalize

autocorrect

autocorrect HTMLElement 接口的属性控制是否为拼写和/或标点错误启用了可编辑文本的自动更正。

MDN 参考

autocorrect: boolean

属性值

boolean

继承自 HTMLElement.autocorrect

autofocus

MDN 参考

autofocus: boolean

属性值

boolean

继承自 HTMLElement.autofocus

baseURI

Node 接口的只读 baseURI 属性返回包含节点的文档的绝对基 URL。

MDN 参考

baseURI: string

属性值

string

继承自 HTMLElement.baseURI

CDATA_SECTION_NODE

节点是 CDATASection 节点。

CDATA_SECTION_NODE: 4

属性值

4

继承自 HTMLElement.CDATA_SECTION_NODE 的

childElementCount

MDN 参考

childElementCount: number

属性值

number

继承自 HTMLElement.childElementCount

childNodes

Node 接口的只读 childNodes 属性返回分配了第一个子节点的实时索引 0。

MDN 参考

childNodes: NodeListOf<ChildNode>

属性值

NodeListOf<ChildNode>

继承自 HTMLElement.childNodes

children

返回子元素。

MDN 参考

children: HTMLCollection

属性值

HTMLCollection

继承自 HTMLElement.children

className

className指定元素的属性。

MDN 参考

className: string

属性值

string

继承自 HTMLElement.className

clientHeight

clientHeight对于没有 CSS 或内联布局框的元素,元素接口的只读属性为零;否则,它是元素的内部高度(以像素为单位)。

MDN 参考

clientHeight: number

属性值

number

继承自 HTMLElement.clientHeight

clientLeft

clientLeft Element 接口的只读属性返回元素左边框的宽度(以像素为单位)。

MDN 参考

clientLeft: number

属性值

number

继承自 HTMLElement.clientLeft

clientTop

clientTop Element 接口的只读属性返回元素上边框的宽度(以像素为单位)。

MDN 参考

clientTop: number

属性值

number

继承自 HTMLElement.clientTop

clientWidth

元素 clientWidth 接口的只读属性对于无 CSS 的内联元素和元素为零;否则,它是元素的内部宽度(以像素为单位)。

MDN 参考

clientWidth: number

属性值

number

继承自 HTMLElement.clientWidth

COMMENT_NODE

节点是注释节点。

COMMENT_NODE: 8

属性值

8

继承自 HTMLElement.COMMENT_NODE 的

contentEditable

MDN 参考

contentEditable: string

属性值

string

继承自 HTMLElement.contentEditable

currentCSSZoom

currentCSSZoom Element 接口的只读属性提供元素的“有效”CSSzoom,同时考虑到应用于元素及其所有父元素的缩放。

MDN 参考

currentCSSZoom: number

属性值

number

继承自 HTMLElement.currentCSSZoom

dataset

MDN 参考

dataset: DOMStringMap

属性值

DOMStringMap

继承自 HTMLElement.dataset

dir

该 HTMLElement.dir 属性指示当前元素内容的文本写入方向性。

MDN 参考

dir: string

属性值

string

继承自 HTMLElement.dir

DOCUMENT_FRAGMENT_NODE

节点是 DocumentFragment 节点。

DOCUMENT_FRAGMENT_NODE: 11

属性值

11

继承自 HTMLElement.DOCUMENT_FRAGMENT_NODE 的

DOCUMENT_NODE

节点是文档。

DOCUMENT_NODE: 9

属性值

9

继承自 HTMLElement.DOCUMENT_NODE 的

DOCUMENT_POSITION_CONTAINED_BY

当其他节点是节点的后代时设置。

DOCUMENT_POSITION_CONTAINED_BY: 16

属性值

16

继承自 HTMLElement.DOCUMENT_POSITION_CONTAINED_BY 的

DOCUMENT_POSITION_CONTAINS

当其他节点是节点的上级时设置。

DOCUMENT_POSITION_CONTAINS: 8

属性值

8

继承自 HTMLElement.DOCUMENT_POSITION_CONTAINS 的

DOCUMENT_POSITION_DISCONNECTED

当节点和其他节点不在同一树中时设置。

DOCUMENT_POSITION_DISCONNECTED: 1

属性值

1

继承自 HTMLElement.DOCUMENT_POSITION_DISCONNECTED 的

DOCUMENT_POSITION_FOLLOWING

当其他节点位于以下节点时设置。

DOCUMENT_POSITION_FOLLOWING: 4

属性值

4

继承自 HTMLElement.DOCUMENT_POSITION_FOLLOWING 的

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32

属性值

32

继承自 HTMLElement.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC 的

DOCUMENT_POSITION_PRECEDING

设置其他节点之前的节点。

DOCUMENT_POSITION_PRECEDING: 2

属性值

2

继承自 HTMLElement.DOCUMENT_POSITION_PRECEDING 的

DOCUMENT_TYPE_NODE

node 是 doctype。

DOCUMENT_TYPE_NODE: 10

属性值

10

继承自 HTMLElement.DOCUMENT_TYPE_NODE 的

draggable

draggable HTMLElement 接口的属性获取并设置一个布尔基元,指示元素是否可拖动。

MDN 参考

draggable: boolean

属性值

boolean

继承自 HTMLElement.draggable

ELEMENT_NODE

node 是一个元素。

ELEMENT_NODE: 1

属性值

1

继承自 HTMLElement.ELEMENT_NODE 的

enterKeyHint

MDN 参考

enterKeyHint: string

属性值

string

继承自 HTMLElement.enterKeyHint

ENTITY_NODE

ENTITY_NODE: 6

属性值

6

继承自 HTMLElement.ENTITY_NODE

ENTITY_REFERENCE_NODE

ENTITY_REFERENCE_NODE: 5

属性值

5

继承自 HTMLElement.ENTITY_REFERENCE_NODE 的

firstChild

Node 接口的只读 firstChild 属性返回节点在树中的第一个子级,或者 null 节点没有子级。

MDN 参考

firstChild: ChildNode | null

属性值

ChildNode | null

继承自 HTMLElement.firstChild

firstElementChild

返回作为元素的第一个子级,否则返回 null。

MDN 参考

firstElementChild: Element | null

属性值

Element | null

继承自 HTMLElement.firstElementChild

hidden

HTMLElement 属性 hidden 反映元素 hidden 属性的值。

MDN 参考

hidden: boolean

属性值

boolean

继承自 HTMLElement.hidden

id

id Element 接口的属性表示元素的标识符,反映id全局属性。

MDN 参考

id: string

属性值

string

继承自 HTMLElement.id 的

inert

HTMLElement 属性 inert 反映元素 inert 属性的值。

MDN 参考

inert: boolean

属性值

boolean

继承自 HTMLElement.inert

innerHTML

innerHTML Element 接口的属性获取或设置元素中包含的 HTML 或 XML 标记。

MDN 参考

innerHTML: string

属性值

string

继承自 HTMLElement.innerHTML

innerText

innerText HTMLElement 接口的属性表示节点及其后代的呈现文本内容。

MDN 参考

innerText: string

属性值

string

继承自 HTMLElement.innerText

inputMode

MDN 参考

inputMode: string

属性值

string

继承自 HTMLElement.inputMode

isConnected

Node 接口的只读 isConnected 属性返回一个布尔值,指示节点是直接还是间接地连接到 Document 对象。

MDN 参考

isConnected: boolean

属性值

boolean

继承自 HTMLElement.isConnected

isContentEditable

MDN 参考

isContentEditable: boolean

属性值

boolean

继承自 HTMLElement.isContentEditable

lang

lang HTMLElement 接口的属性以 MISSING 的形式指示元素属性值和文本内容的基语言:RFC(5646,“BCP 47 语言标识符标记”)]。

MDN 参考

lang: string

属性值

string

继承自 HTMLElement.lang

lastChild

Node 接口的只读 lastChild 属性返回节点的最后一个子级,或者 null 如果没有子节点。

MDN 参考

lastChild: ChildNode | null

属性值

ChildNode | null

继承自 HTMLElement.lastChild

lastElementChild

返回作为元素的最后一个子级,否则返回 null。

MDN 参考

lastElementChild: Element | null

属性值

Element | null

继承自 HTMLElement.lastElementChild

localName

Element.localName只读属性返回元素的限定名称的本地部分。

MDN 参考

localName: string

属性值

string

继承自 HTMLElement.localName

namespaceURI

Element.namespaceURI只读属性返回元素的命名空间 URI,或者null元素不在命名空间中。

MDN 参考

namespaceURI: string | null

属性值

string | null

继承自 HTMLElement.namespaceURI

nextElementSibling

返回作为元素的第一个同级,否则返回 null。

MDN 参考

nextElementSibling: Element | null

属性值

Element | null

继承自 HTMLElement.nextElementSibling

nextSibling

Node 接口的只读 nextSibling 属性将紧跟在其父节点的 Node.childNodes 中的指定节点之后返回节点,或者如果指定节点是父元素中的最后一个子节点,则返回 null 该节点。

MDN 参考

nextSibling: ChildNode | null

属性值

ChildNode | null

继承自 HTMLElement.nextSibling

nodeName

Node 的只读 nodeName 属性将当前节点的名称作为字符串返回。

MDN 参考

nodeName: string

属性值

string

继承自 HTMLElement.nodeName

nodeType

Node 接口的只读 nodeType 属性是一个整数,用于标识节点是什么。

MDN 参考

nodeType: number

属性值

number

继承自 HTMLElement.nodeType

nodeValue

nodeValue Node 接口的属性返回或设置当前节点的值。

MDN 参考

nodeValue: string | null

属性值

string | null

继承自 HTMLElement.nodeValue

nonce

MDN 参考

nonce?: string

属性值

string

继承自 HTMLElement.nonce

NOTATION_NODE

NOTATION_NODE: 12

属性值

12

继承自 HTMLElement.NOTATION_NODE 的

offsetHeight

offsetHeight HTMLElement 接口的只读属性以整数形式返回元素的高度,包括垂直填充和边框。

MDN 参考

offsetHeight: number

属性值

number

继承自 HTMLElement.offsetHeight

offsetLeft

offsetLeft HTMLElement 接口的只读属性返回当前元素左上角在 HTMLElement.offsetParent 节点中向左偏移的像素数。

MDN 参考

offsetLeft: number

属性值

number

继承自 HTMLElement.offsetLeft

offsetParent

HTMLElement.offsetParent只读属性返回对位于包含层次结构中最接近的上级元素的元素的引用。

MDN 参考

offsetParent: Element | null

属性值

Element | null

继承自 HTMLElement.offsetParent

offsetTop

offsetTop HTMLElement 接口的只读属性返回从当前元素的外部边框(包括其边距)到 HTMLelement.offsetParent 的上填充边缘(最接近定位的上级元素)的距离。

MDN 参考

offsetTop: number

属性值

number

继承自 HTMLElement.offsetTop

offsetWidth

offsetWidth HTMLElement 接口的只读属性将元素的布局宽度作为整数返回。

MDN 参考

offsetWidth: number

属性值

number

继承自 HTMLElement.offsetWidth

onabort

MDN 参考

onabort: (this: GlobalEventHandlers, ev: UIEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: UIEvent) => any | null

继承自 HTMLElement.onabort

onanimationcancel

MDN 参考

onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

继承自 HTMLElement.onanimationcancel

onanimationend

MDN 参考

onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

继承自 HTMLElement.onanimationend

onanimationiteration

MDN 参考

onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

继承自 HTMLElement.onanimationiteration

onanimationstart

MDN 参考

onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

继承自 HTMLElement.onanimationstart

onauxclick

MDN 参考

onauxclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onauxclick

onbeforeinput

MDN 参考

onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: InputEvent) => any | null

继承自 HTMLElement.onbeforeinput

onbeforematch

MDN 参考

onbeforematch: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onbeforematch

onbeforetoggle

MDN 参考

onbeforetoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

继承自 HTMLElement.onbeforetoggle

onblur

MDN 参考

onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

继承自 HTMLElement.onblur

oncancel

MDN 参考

oncancel: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oncancel

oncanplay

MDN 参考

oncanplay: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oncanplay

oncanplaythrough

MDN 参考

oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oncanplaythrough

onchange

MDN 参考

onchange: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onchange

onclick

MDN 参考

onclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onclick

onclose

MDN 参考

onclose: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onclose

oncontextlost

MDN 参考

oncontextlost: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oncontextlost

oncontextmenu

MDN 参考

oncontextmenu: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.oncontextmenu

oncontextrestored

MDN 参考

oncontextrestored: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oncontextrestored

oncopy

MDN 参考

oncopy: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

继承自 HTMLElement.oncopy

oncuechange

MDN 参考

oncuechange: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oncuechange

oncut

MDN 参考

oncut: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

继承自 HTMLElement.oncut

ondblclick

MDN 参考

ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.ondblclick

ondrag

MDN 参考

ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: DragEvent) => any | null

继承自 HTMLElement.ondrag

ondragend

MDN 参考

ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: DragEvent) => any | null

继承自 HTMLElement.ondragend

ondragenter

MDN 参考

ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: DragEvent) => any | null

继承自 HTMLElement.ondragenter

ondragleave

MDN 参考

ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: DragEvent) => any | null

继承自 HTMLElement.ondragleave

ondragover

MDN 参考

ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: DragEvent) => any | null

继承自 HTMLElement.ondragover

ondragstart

MDN 参考

ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: DragEvent) => any | null

继承自 HTMLElement.ondragstart

ondrop

MDN 参考

ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: DragEvent) => any | null

继承自 HTMLElement.ondrop

ondurationchange

MDN 参考

ondurationchange: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.ondurationchange

onemptied

MDN 参考

onemptied: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onemptied

onended

MDN 参考

onended: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onended

onerror

MDN 参考

onerror: OnErrorEventHandler

属性值

OnErrorEventHandler

继承自 HTMLElement.onerror

onfocus

MDN 参考

onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

继承自 HTMLElement.onfocus

onformdata

MDN 参考

onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: FormDataEvent) => any | null

继承自 HTMLElement.onformdata

onfullscreenchange

MDN 参考

onfullscreenchange: (this: Element, ev: Event) => any | null

属性值

(this: Element, ev: Event) => any | null

继承自 HTMLElement.onfullscreenchange

onfullscreenerror

MDN 参考

onfullscreenerror: (this: Element, ev: Event) => any | null

属性值

(this: Element, ev: Event) => any | null

继承自 HTMLElement.onfullscreenerror

ongotpointercapture

MDN 参考

ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.ongotpointercapture

oninput

MDN 参考

oninput: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oninput

oninvalid

MDN 参考

oninvalid: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.oninvalid

onkeydown

MDN 参考

onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

继承自 HTMLElement.onkeydown

onkeypress

警告

现已弃用此 API。

MDN Reference

onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

继承自 HTMLElement.onkeypress

onkeyup

MDN 参考

onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

继承自 HTMLElement.onkeyup

onload

MDN 参考

onload: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onload

onloadeddata

MDN 参考

onloadeddata: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onloadeddata

onloadedmetadata

MDN 参考

onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onloadedmetadata

onloadstart

MDN 参考

onloadstart: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onloadstart

onlostpointercapture

MDN 参考

onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onlostpointercapture

onmousedown

MDN 参考

onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.onmousedown

onmouseenter

MDN 参考

onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.onmouseenter

onmouseleave

MDN 参考

onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.onmouseleave

onmousemove

MDN 参考

onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.onmousemove

onmouseout

MDN 参考

onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.onmouseout

onmouseover

MDN 参考

onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.onmouseover

onmouseup

MDN 参考

onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

继承自 HTMLElement.onmouseup

onpaste

MDN 参考

onpaste: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

继承自 HTMLElement.onpaste

onpause

MDN 参考

onpause: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onpause

onplay

MDN 参考

onplay: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onplay

onplaying

MDN 参考

onplaying: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onplaying

onpointercancel

MDN 参考

onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointercancel

onpointerdown

MDN 参考

onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointerdown

onpointerenter

MDN 参考

onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointerenter

onpointerleave

MDN 参考

onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointerleave

onpointermove

MDN 参考

onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointermove

onpointerout

MDN 参考

onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointerout

onpointerover

MDN 参考

onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointerover

onpointerrawupdate

仅在安全上下文中可用。

MDN 参考

onpointerrawupdate: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onpointerrawupdate

onpointerup

MDN 参考

onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

继承自 HTMLElement.onpointerup

onprogress

MDN 参考

onprogress: (this: GlobalEventHandlers, ev: ProgressEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: ProgressEvent) => any | null

继承自 HTMLElement.onprogress 的

onratechange

MDN 参考

onratechange: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onratechange

onreset

MDN 参考

onreset: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onreset

onresize

MDN 参考

onresize: (this: GlobalEventHandlers, ev: UIEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: UIEvent) => any | null

继承自 HTMLElement.onresize

onscroll

MDN 参考

onscroll: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onscroll

onscrollend

MDN 参考

onscrollend: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onscrollend

onsecuritypolicyviolation

MDN 参考

onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null

继承自 HTMLElement.onsecuritypolicyviolation

onseeked

MDN 参考

onseeked: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onseeked

onseeking

MDN 参考

onseeking: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onseeking

onselect

MDN 参考

onselect: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onselect

onselectionchange

MDN 参考

onselectionchange: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onselectionchange

onselectstart

MDN 参考

onselectstart: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onselectstart

onslotchange

MDN 参考

onslotchange: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onslotchange

onstalled

MDN 参考

onstalled: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onstalled

onsubmit

MDN 参考

onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: SubmitEvent) => any | null

继承自 HTMLElement.onsubmit

onsuspend

MDN 参考

onsuspend: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onsuspend

ontimeupdate

MDN 参考

ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.ontimeupdate

ontoggle

MDN 参考

ontoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

继承自 HTMLElement.onggle

ontouchcancel

MDN 参考

ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

继承自 HTMLElement.ontouchcancel

ontouchend

MDN 参考

ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

继承自 HTMLElement.ontouchend

ontouchmove

MDN 参考

ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

继承自 HTMLElement.ontouchmove

ontouchstart

MDN 参考

ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

继承自 HTMLElement.ontouchstart

ontransitioncancel

MDN 参考

ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

继承自 HTMLElement.ontransitioncancel

ontransitionend

MDN 参考

ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

继承自 HTMLElement.ontransitionend

ontransitionrun

MDN 参考

ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

继承自 HTMLElement.ontransitionrun

ontransitionstart

MDN 参考

ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

继承自 HTMLElement.ontransitionstart

onvolumechange

MDN 参考

onvolumechange: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onvolumechange

onwaiting

MDN 参考

onwaiting: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onwaiting

onwebkitanimationend

警告

现已弃用此 API。

This is a legacy alias of onanimationend.

MDN Reference

onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onwebkitanimationend

onwebkitanimationiteration

警告

现已弃用此 API。

This is a legacy alias of onanimationiteration.

MDN Reference

onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onwebkitanimationiteration

onwebkitanimationstart

警告

现已弃用此 API。

This is a legacy alias of onanimationstart.

MDN Reference

onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onwebkitanimationstart

onwebkittransitionend

警告

现已弃用此 API。

This is a legacy alias of ontransitionend.

MDN Reference

onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any | null

属性值

(this: GlobalEventHandlers, ev: Event) => any | null

继承自 HTMLElement.onwebkittransitionend

onwheel

MDN 参考

onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any | null

属性值

(this: GlobalEventHandlers, ev: WheelEvent) => any | null

继承自 HTMLElement.onwheel

outerHTML

outerHTML Element DOM 接口的属性获取描述元素(包括其后代)的序列化 HTML 片段。

MDN 参考

outerHTML: string

属性值

string

继承自 HTMLElement.outerHTML

outerText

outerText HTMLElement 接口的属性返回与 HTMLElement.innerText 相同的值。

MDN 参考

outerText: string

属性值

string

继承自 HTMLElement.outerText

ownerDocument

Node 接口的只读 ownerDocument 属性返回节点的顶级文档对象。

MDN 参考

ownerDocument: Document

属性值

继承自 HTMLElement.ownerDocument

parentElement

Node 接口的只读 parentElement 属性返回 DOM 节点的父元素,或者 null 节点没有父元素,或者其父元素不是 DOM 元素。

MDN 参考

parentElement: HTMLElement | null

属性值

HTMLElement | null

继承自 HTMLElement.parentElement

parentNode

Node 接口的只读 parentNode 属性返回 DOM 树中指定节点的父级。

MDN 参考

parentNode: ParentNode | null

属性值

ParentNode | null

继承自 HTMLElement.parentNode

popover

popover HTMLElement 接口的属性通过 JavaScript('auto'或'hint''manual')获取和设置元素的弹出状态,并可用于功能检测。

MDN 参考

popover: string | null

属性值

string | null

继承自 HTMLElement.popover

prefix

Element.prefix只读属性返回指定元素的命名空间前缀,或者null未指定前缀。

MDN 参考

prefix: string | null

属性值

string | null

继承自 HTMLElement.prefix

previousElementSibling

返回前一个是元素的同级,否则返回 null。

MDN 参考

previousElementSibling: Element | null

属性值

Element | null

继承自 HTMLElement.previousElementSibling

previousSibling

Node 接口的只读 previousSibling 属性返回紧邻其父节点中指定节点的前面,或者 null 指定节点是该列表中的第一个节点。

MDN 参考

previousSibling: ChildNode | null

属性值

ChildNode | null

继承自 HTMLElement.previousSibling

PROCESSING_INSTRUCTION_NODE

节点是 ProcessingInstruction 节点。

PROCESSING_INSTRUCTION_NODE: 7

属性值

7

继承自 HTMLElement.PROCESSING_INSTRUCTION_NODE 的

role

MDN 参考

role: string | null

属性值

string | null

继承自 HTMLElement.role

scrollHeight

scrollHeight Element 接口的只读属性是对元素内容高度的度量,包括由于溢出而在屏幕上不可见的内容。

MDN 参考

scrollHeight: number

属性值

number

继承自 HTMLElement.scrollHeight

scrollLeft

scrollLeft Element 接口的属性获取或设置元素内容从其左边缘滚动的像素数。

MDN 参考

scrollLeft: number

属性值

number

继承自 HTMLElement.scrollLeft

scrollTop

scrollTop Element 接口的属性获取或设置元素内容从其上边缘滚动的像素数。

MDN 参考

scrollTop: number

属性值

number

继承自 HTMLElement.scrollTop

scrollWidth

scrollWidth元素接口的只读属性是对元素内容的宽度的度量,包括由于溢出而在屏幕上不可见的内容。

MDN 参考

scrollWidth: number

属性值

number

继承自 HTMLElement.scrollWidth

shadowRoot

Element.shadowRoot只读属性表示元素托管的阴影根。

MDN 参考

shadowRoot: ShadowRoot | null

属性值

ShadowRoot | null

继承自 HTMLElement.shadowRoot

slot

slot Element 接口的属性返回插入元素的阴影 DOM 槽的名称。

MDN 参考

slot: string

属性值

string

继承自 HTMLElement.slot

spellcheck

spellcheck HTMLElement 接口的属性表示控制拼写检查提示的布尔值。

MDN 参考

spellcheck: boolean

属性值

boolean

继承自 HTMLElement.spellcheck

tabIndex

MDN 参考

tabIndex: number

属性值

number

继承自 HTMLElement.tabIndex

tagName

tagName Element 接口的只读属性返回调用元素的标记名称。

MDN 参考

tagName: string

属性值

string

继承自 HTMLElement.tagName

TEXT_NODE

节点是文本节点。

TEXT_NODE: 3

属性值

3

继承自 HTMLElement.TEXT_NODE 的

title

该 HTMLElement.title 属性表示元素的标题:鼠标位于节点上方时,通常显示在“工具提示”弹出窗口中的文本。

MDN 参考

title: string

属性值

string

继承自 HTMLElement.title

translate

translate HTMLElement 接口的属性指示元素的属性值及其文本节点子级的值是在本地化页面时转换的,还是是否保持不变。

MDN 参考

translate: boolean

属性值

boolean

继承自 HTMLElement.translate

writingSuggestions

writingSuggestions HTMLElement 接口的属性是一个字符串,指示是否应在元素范围内启用浏览器提供的写入建议。

MDN 参考

writingSuggestions: string

属性值

string

继承自 HTMLElement.writingSuggestions

方法详细信息

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)

function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions)

参数

type

string

listener

EventListenerOrEventListenerObject

options

boolean | AddEventListenerOptions

addEventListener<K>(K, (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, boolean | AddEventListenerOptions)

function addEventListener<K>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions)

参数

type

K

listener

(this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any

options

boolean | AddEventListenerOptions

getSVGDocument()

getSVGDocument() HTMLIFrameElement 接口的方法返回嵌入 SVG 的文档对象。

MDN 参考

function getSVGDocument(): Document | null

返回

Document | null

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)

function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions)

参数

type

string

listener

EventListenerOrEventListenerObject

options

boolean | EventListenerOptions

removeEventListener<K>(K, (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, boolean | EventListenerOptions)

function removeEventListener<K>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions)

参数

type

K

listener

(this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any

options

boolean | EventListenerOptions

继承的方法详细信息

after((string | Node)[])

在节点之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

function after(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.after

animate(Keyframe[] | PropertyIndexedKeyframes | null, number | KeyframeAnimationOptions)

MDN 参考

function animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation

参数

keyframes

Keyframe[] | PropertyIndexedKeyframes | null

options

number | KeyframeAnimationOptions

返回

Animation

继承自 HTMLElement.animate

append((string | Node)[])

在节点的最后一个子级之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

function append(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.append

appendChild<T>(T)

appendChild() Node 接口的方法将节点添加到指定父节点的子节点列表的末尾。

MDN 参考

function appendChild<T>(node: T): T

参数

node

T

返回

T

继承自 HTMLElement.appendChild

attachInternals()

该方法 HTMLElement.attachInternals() 返回 ElementInternals 对象。

MDN 参考

function attachInternals(): ElementInternals

返回

ElementInternals

继承自 HTMLElement.attachInternals

attachShadow(ShadowRootInit)

该方法 Element.attachShadow() 将阴影 DOM 树附加到指定的元素,并返回对其 ShadowRoot 的引用。

MDN 参考

function attachShadow(init: ShadowRootInit): ShadowRoot

参数

init

ShadowRootInit

返回

ShadowRoot

继承自 HTMLElement.attachShadow

before((string | Node)[])

在节点之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

function before(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.before

blur()

MDN 参考

function blur()

继承自 HTMLElement.blur

checkVisibility(CheckVisibilityOptions)

checkVisibility()元素接口的方法检查元素是否可见。

MDN 参考

function checkVisibility(options?: CheckVisibilityOptions): boolean

参数

options

CheckVisibilityOptions

返回

boolean

继承自 HTMLElement.checkVisibility

click()

该方法 HTMLElement.click() 模拟鼠标单击元素。

MDN 参考

function click()

继承自 HTMLElement.click

cloneNode(boolean)

Node cloneNode() 接口的方法返回调用此方法的节点的副本。

MDN 参考

function cloneNode(subtree?: boolean): Node

参数

subtree

boolean

返回

Node

继承自 HTMLElement.cloneNode

closest<E>(string)

function closest<E>(selectors: string): E | null

参数

selectors

string

返回

E | null

继承自 HTMLElement.closest

closest<K>(K)

closest()元素接口的方法遍历元素及其父元素(指向文档根目录),直到找到与指定 CSS 选择器匹配的节点。

MDN 参考

function closest<K>(selector: K): HTMLElementTagNameMap[K] | null

参数

selector

K

返回

HTMLElementTagNameMap[K] | null

继承自 HTMLElement.closest

closest<K>(K)

function closest<K>(selector: K): SVGElementTagNameMap[K] | null

参数

selector

K

返回

SVGElementTagNameMap[K] | null

继承自 HTMLElement.closest

closest<K>(K)

function closest<K>(selector: K): MathMLElementTagNameMap[K] | null

参数

selector

K

返回

MathMLElementTagNameMap[K] | null

继承自 HTMLElement.closest

compareDocumentPosition(Node)

Node compareDocumentPosition() 接口的方法报告其自变量节点相对于调用它的节点的位置。

MDN 参考

function compareDocumentPosition(other: Node): number

参数

other

Node

返回

number

继承自 HTMLElement.compareDocumentPosition

computedStyleMap()

computedStyleMap() Element 接口的方法返回 StylePropertyMapReadOnly 接口,该接口提供 CSS 声明块的只读表示形式,这是 CSSStyleDeclaration 的替代方法。

MDN 参考

function computedStyleMap(): StylePropertyMapReadOnly

返回

StylePropertyMapReadOnly

继承自 HTMLElement.computedStyleMap

contains(Node | null)

contains() Node 接口的方法返回一个布尔值,该值指示节点是否是给定节点的后代,即节点本身、其直接子级之一(Node.childNodes)、子级的直接子级之一等。

MDN 参考

function contains(other: Node | null): boolean

参数

other

Node | null

返回

boolean

继承自 HTMLElement.contains

dispatchEvent(Event)

dispatchEvent() EventTarget 的方法按适当的顺序将事件发送到对象(同步)调用受影响的事件侦听器。

MDN 参考

function dispatchEvent(event: Event): boolean

参数

event

Event

返回

boolean

继承自 HTMLElement.dispatchEvent

focus(FocusOptions)

MDN 参考

function focus(options?: FocusOptions)

参数

options

FocusOptions

继承自 HTMLElement.focus

getAnimations(GetAnimationsOptions)

MDN 参考

function getAnimations(options?: GetAnimationsOptions): Animation[]

参数

options

GetAnimationsOptions

返回

Animation[]

继承自 HTMLElement.getAnimations

getAttribute(string)

getAttribute()元素的方法。

MDN 参考

function getAttribute(qualifiedName: string): string | null

参数

qualifiedName

string

返回

string | null

继承自 HTMLElement.getAttribute

getAttributeNames()

getAttributeNames()数组的方法。

MDN 参考

function getAttributeNames(): string[]

返回

string[]

继承自 HTMLElement.getAttributeNames

getAttributeNode(string)

以 Attr 节点的形式返回指定元素的指定属性。

MDN 参考

function getAttributeNode(qualifiedName: string): Attr | null

参数

qualifiedName

string

返回

Attr | null

继承自 HTMLElement.getAttributeNode

getAttributeNodeNS(string | null, string)

getAttributeNodeNS() Element 接口的方法返回元素的命名空间 Attr 节点。

MDN 参考

function getAttributeNodeNS(namespace: string | null, localName: string): Attr | null

参数

namespace

string | null

localName

string

返回

Attr | null

继承自 HTMLElement.getAttributeNodeNS

getAttributeNS(string | null, string)

getAttributeNS() Element 接口的方法返回具有指定命名空间和名称的属性的字符串值。

MDN 参考

function getAttributeNS(namespace: string | null, localName: string): string | null

参数

namespace

string | null

localName

string

返回

string | null

继承自 HTMLElement.getAttributeNS

getBoundingClientRect()

该方法 Element.getBoundingClientRect() 返回相对于视区的位置。

MDN 参考

function getBoundingClientRect(): DOMRect

返回

DOMRect

继承自 HTMLElement.getBoundingClientRect

getClientRects()

getClientRects() Element 接口的方法返回 DOMRect 对象的集合,这些对象指示客户端中每个 CSS 边框框的边界矩形。

MDN 参考

function getClientRects(): DOMRectList

返回

DOMRectList

继承自 HTMLElement.getClientRects

getElementsByClassName(string)

Element 方法 getElementsByClassName() 返回实时指定的类名或名称。

MDN 参考

function getElementsByClassName(classNames: string): HTMLCollectionOf<Element>

参数

classNames

string

返回

HTMLCollectionOf<Element>

继承自 HTMLElement.getElementsByClassName

getElementsByTagName(string)

function getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>

参数

qualifiedName

string

返回

HTMLCollectionOf<Element>

继承自 HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

该方法 Element.getElementsByTagName() 返回指定元素的实时 All 后代,但不会搜索元素本身。

MDN 参考

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>

参数

qualifiedName

K

返回

HTMLCollectionOf<HTMLElementTagNameMap[K]>

继承自 HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>

参数

qualifiedName

K

返回

HTMLCollectionOf<SVGElementTagNameMap[K]>

继承自 HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>

参数

qualifiedName

K

返回

HTMLCollectionOf<MathMLElementTagNameMap[K]>

继承自 HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

警告

现已弃用此 API。

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

参数

qualifiedName

K

返回

HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

继承自 HTMLElement.getElementsByTagName

getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>

参数

namespaceURI

"http://www.w3.org/1998/Math/MathML"

localName

string

返回

HTMLCollectionOf<MathMLElement>

继承自 HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

该方法 Element.getElementsByTagNameNS() 返回一个具有给定标记名称的元素的实时 HTMLCollection,该标记名称属于给定命名空间。

MDN 参考

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>

参数

namespaceURI

"http://www.w3.org/1999/xhtml"

localName

string

返回

HTMLCollectionOf<HTMLElement>

继承自 HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>

参数

namespaceURI

"http://www.w3.org/2000/svg"

localName

string

返回

HTMLCollectionOf<SVGElement>

继承自 HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS(string | null, string)

function getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>

参数

namespace

string | null

localName

string

返回

HTMLCollectionOf<Element>

继承自 HTMLElement.getElementsByTagNameNS

getHTML(GetHTMLOptions)

getHTML()元素接口的方法用于将元素的 DOM 序列化为 HTML 字符串。

MDN 参考

function getHTML(options?: GetHTMLOptions): string

参数

options

GetHTMLOptions

返回

string

继承自 HTMLElement.getHTML

getRootNode(GetRootNodeOptions)

getRootNode() Node 接口的方法返回上下文对象的根,该根(可选)包括影子根(如果可用)。

MDN 参考

function getRootNode(options?: GetRootNodeOptions): Node

参数

options

GetRootNodeOptions

返回

Node

继承自 HTMLElement.getRootNode

hasAttribute(string)

该方法 Element.hasAttribute() 返回一个 布尔 值,该值指示指定的元素是否具有指定的属性。

MDN 参考

function hasAttribute(qualifiedName: string): boolean

参数

qualifiedName

string

返回

boolean

继承自 HTMLElement.hasAttribute

hasAttributeNS(string | null, string)

hasAttributeNS() Element 接口的方法返回一个布尔值,该值指示当前元素是否具有具有指定命名空间的指定属性。

MDN 参考

function hasAttributeNS(namespace: string | null, localName: string): boolean

参数

namespace

string | null

localName

string

返回

boolean

继承自 HTMLElement.hasAttributeNS

hasAttributes()

hasAttributes() Element 接口的方法返回一个布尔值,该值指示当前元素是否具有任何属性。

MDN 参考

function hasAttributes(): boolean

返回

boolean

继承自 HTMLElement.hasAttributes

hasChildNodes()

Node hasChildNodes() 接口的方法返回一个布尔值,该值指示给定节点是否具有子节点。

MDN 参考

function hasChildNodes(): boolean

返回

boolean

继承自 HTMLElement.hasChildNodes

hasPointerCapture(number)

hasPointerCapture()由给定指针 ID 标识的指针的指针捕获方法。

MDN 参考

function hasPointerCapture(pointerId: number): boolean

参数

pointerId

number

返回

boolean

继承自 HTMLElement.hasPointerCapture

hidePopover()

hidePopover() HTMLElement 接口的方法通过从顶层删除具有有效属性的弹出元素(即具有有效popover属性的元素)并设置display: none其样式来隐藏该元素。

MDN 参考

function hidePopover()

继承自 HTMLElement.hidePopover

insertAdjacentElement(InsertPosition, Element)

对其 insertAdjacentElement() 调用的元素的相对方法。

MDN 参考

function insertAdjacentElement(where: InsertPosition, element: Element): Element | null

参数

where

InsertPosition

element

Element

返回

Element | null

继承自 HTMLElement.insertAdjacentElement

insertAdjacentHTML(InsertPosition, string)

insertAdjacentHTML()生成的节点的方法位于指定位置的 DOM 树中。

MDN 参考

function insertAdjacentHTML(position: InsertPosition, string: string)

参数

position

InsertPosition

string

string

继承自 HTMLElement.insertAdjacentHTML

insertAdjacentText(InsertPosition, string)

元素 insertAdjacentText() 接口的方法,给定相对位置和字符串,在给定位置相对于从中调用的元素插入一个新的文本节点。

MDN 参考

function insertAdjacentText(where: InsertPosition, data: string)

参数

where

InsertPosition

data

string

继承自 HTMLElement.insertAdjacentText

insertBefore<T>(T, Node | null)

Node insertBefore() 接口的方法在 引用节点 之前插入节点作为指定 父节点的子节点。

MDN 参考

function insertBefore<T>(node: T, child: Node | null): T

参数

node

T

child

Node | null

返回

T

继承自 HTMLElement.insertBefore

isDefaultNamespace(string | null)

isDefaultNamespace() Node 接口的方法接受命名空间 URI 作为参数。

MDN 参考

function isDefaultNamespace(namespace: string | null): boolean

参数

namespace

string | null

返回

boolean

继承自 HTMLElement.isDefaultNamespace

isEqualNode(Node | null)

isEqualNode() Node 接口的方法测试两个节点是否相等。

MDN 参考

function isEqualNode(otherNode: Node | null): boolean

参数

otherNode

Node | null

返回

boolean

继承自 HTMLElement.isEqualNode

isSameNode(Node | null)

Node isSameNode() 接口的方法是严格相等运算符的 === 旧别名。

MDN 参考

function isSameNode(otherNode: Node | null): boolean

参数

otherNode

Node | null

返回

boolean

继承自 HTMLElement.isSameNode

lookupNamespaceURI(string | null)

Node lookupNamespaceURI() 接口的方法采用前缀作为参数,并返回与给定节点上关联的命名空间 URI(如果 null 找不到)。

MDN 参考

function lookupNamespaceURI(prefix: string | null): string | null

参数

prefix

string | null

返回

string | null

继承自 HTMLElement.lookupNamespaceURI

lookupPrefix(string | null)

Node lookupPrefix() 接口的方法返回一个字符串,其中包含给定命名空间 URI 的前缀(如果存在)以及 null 不存在的字符串。

MDN 参考

function lookupPrefix(namespace: string | null): string | null

参数

namespace

string | null

返回

string | null

继承自 HTMLElement.lookupPrefix

matches(string)

matches()元素接口的方法测试是否由指定的 CSS 选择器选择该元素。

MDN 参考

function matches(selectors: string): boolean

参数

selectors

string

返回

boolean

继承自 HTMLElement.matches

normalize()

Node normalize() 接口的方法将指定节点及其所有子树都放入 规范化 形式。

MDN 参考

function normalize()

继承自 HTMLElement.normalize

prepend((string | Node)[])

在节点的第一个子级之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

function prepend(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.prepend

querySelector<E>(string)

function querySelector<E>(selectors: string): E | null

参数

selectors

string

返回

E | null

继承自 HTMLElement.querySelector

querySelector<K>(K)

返回与选择器匹配的节点后代的第一个元素。

MDN 参考

function querySelector<K>(selectors: K): HTMLElementTagNameMap[K] | null

参数

selectors

K

返回

HTMLElementTagNameMap[K] | null

继承自 HTMLElement.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): SVGElementTagNameMap[K] | null

参数

selectors

K

返回

SVGElementTagNameMap[K] | null

继承自 HTMLElement.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): MathMLElementTagNameMap[K] | null

参数

selectors

K

返回

MathMLElementTagNameMap[K] | null

继承自 HTMLElement.querySelector

querySelector<K>(K)

警告

现已弃用此 API。

function querySelector<K>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null

参数

selectors

K

返回

HTMLElementDeprecatedTagNameMap[K] | null

继承自 HTMLElement.querySelector

querySelectorAll<E>(string)

function querySelectorAll<E>(selectors: string): NodeListOf<E>

参数

selectors

string

返回

NodeListOf<E>

继承自 HTMLElement.querySelectorAll

querySelectorAll<K>(K)

返回与选择器匹配的节点的所有元素后代。

MDN 参考

function querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>

参数

selectors

K

返回

NodeListOf<HTMLElementTagNameMap[K]>

继承自 HTMLElement.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>

参数

selectors

K

返回

NodeListOf<SVGElementTagNameMap[K]>

继承自 HTMLElement.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>

参数

selectors

K

返回

NodeListOf<MathMLElementTagNameMap[K]>

继承自 HTMLElement.querySelectorAll

querySelectorAll<K>(K)

警告

现已弃用此 API。

function querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

参数

selectors

K

返回

NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

继承自 HTMLElement.querySelectorAll

releasePointerCapture(number)

releasePointerCapture()以前为特定 (PointerEvent) 指针设置的方法。

MDN 参考

function releasePointerCapture(pointerId: number)

参数

pointerId

number

继承自 HTMLElement.releasePointerCapture

remove()

删除节点。

MDN 参考

function remove()

继承自 HTMLElement.remove

removeAttribute(string)

Element 方法 removeAttribute() 从元素中删除具有指定名称的属性。

MDN 参考

function removeAttribute(qualifiedName: string)

参数

qualifiedName

string

继承自 HTMLElement.removeAttribute

removeAttributeNode(Attr)

removeAttributeNode() Element 接口的方法从元素中删除指定的 Attr 节点。

MDN 参考

function removeAttributeNode(attr: Attr): Attr

参数

attr

Attr

返回

Attr

继承自 HTMLElement.removeAttributeNode

removeAttributeNS(string | null, string)

removeAttributeNS()如果使用 HTML,并且不需要将请求的属性指定为特定命名空间的一部分,请改用 Element.removeAttribute() 方法。

MDN 参考

function removeAttributeNS(namespace: string | null, localName: string)

参数

namespace

string | null

localName

string

继承自 HTMLElement.removeAttributeNS

removeChild<T>(T)

removeChild() Node 接口的方法从 DOM 中删除子节点,并返回已删除的节点。

MDN 参考

function removeChild<T>(child: T): T

参数

child

T

返回

T

继承自 HTMLElement.removeChild

replaceChild<T>(Node, T)

replaceChild() Node 接口的方法替换给定(父)节点中的子节点。

MDN 参考

function replaceChild<T>(node: Node, child: T): T

参数

node

Node

child

T

返回

T

继承自 HTMLElement.replaceChild

replaceChildren((string | Node)[])

将节点的所有子级替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

function replaceChildren(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.replaceChildren

replaceWith((string | Node)[])

将节点替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

MDN 参考

function replaceWith(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.replaceWith

requestFullscreen(FullscreenOptions)

该方法 Element.requestFullscreen() 发出异步请求以全屏模式显示元素。

MDN 参考

function requestFullscreen(options?: FullscreenOptions): Promise<void>

参数

options

FullscreenOptions

返回

Promise<void>

继承自 HTMLElement.requestFullscreen

requestPointerLock(PointerLockOptions)

使用 requestPointerLock() Element 接口的方法,可以异步请求在给定元素上锁定指针。

MDN 参考

function requestPointerLock(options?: PointerLockOptions): Promise<void>

参数

options

PointerLockOptions

返回

Promise<void>

继承自 HTMLElement.requestPointerLock

scroll(number, number)

function scroll(x: number, y: number)

参数

x

number

y

number

继承自 HTMLElement.scroll

scroll(ScrollToOptions)

scroll() Element 接口的方法将元素滚动到给定元素内的一组特定坐标。

MDN 参考

function scroll(options?: ScrollToOptions)

参数

options

ScrollToOptions

继承自 HTMLElement.scroll

scrollBy(number, number)

function scrollBy(x: number, y: number)

参数

x

number

y

number

继承自 HTMLElement.scrollBy

scrollBy(ScrollToOptions)

scrollBy() Element 接口的方法按给定的量滚动元素。

MDN 参考

function scrollBy(options?: ScrollToOptions)

参数

options

ScrollToOptions

继承自 HTMLElement.scrollBy

scrollIntoView(boolean | ScrollIntoViewOptions)

Element 接口 scrollIntoView() 的方法滚动元素的上级容器,以便调用的 scrollIntoView() 元素对用户可见。

MDN 参考

function scrollIntoView(arg?: boolean | ScrollIntoViewOptions)

参数

arg

boolean | ScrollIntoViewOptions

继承自 HTMLElement.scrollIntoView

scrollTo(number, number)

function scrollTo(x: number, y: number)

参数

x

number

y

number

继承自 HTMLElement.scrollTo

scrollTo(ScrollToOptions)

scrollTo()元素接口的方法滚动到给定元素内的一组特定坐标。

MDN 参考

function scrollTo(options?: ScrollToOptions)

参数

options

ScrollToOptions

继承自 HTMLElement.scrollTo

setAttribute(string, string)

setAttribute() Element 接口的方法设置指定元素上的特性的值。

MDN 参考

function setAttribute(qualifiedName: string, value: string)

参数

qualifiedName

string

value

string

继承自 HTMLElement.setAttribute

setAttributeNode(Attr)

setAttributeNode() Element 接口的方法将新的 Attr 节点添加到指定的元素。

MDN 参考

function setAttributeNode(attr: Attr): Attr | null

参数

attr

Attr

返回

Attr | null

继承自 HTMLElement.setAttributeNode

setAttributeNodeNS(Attr)

setAttributeNodeNS() Element 接口的方法将新的命名空间 Attr 节点添加到元素。

MDN 参考

function setAttributeNodeNS(attr: Attr): Attr | null

参数

attr

Attr

返回

Attr | null

继承自 HTMLElement.setAttributeNodeNS

setAttributeNS(string | null, string, string)

setAttributeNS 添加新属性或更改具有给定命名空间和名称的属性的值。

MDN 参考

function setAttributeNS(namespace: string | null, qualifiedName: string, value: string)

参数

namespace

string | null

qualifiedName

string

value

string

继承自 HTMLElement.setAttributeNS

setHTMLUnsafe(string)

setHTMLUnsafe() Element 接口的方法用于将 HTML 字符串分析为 DocumentFragment,(可选)筛选掉不需要的元素和属性,以及不属于上下文的元素,然后使用它替换 DOM 中的元素子树。

MDN 参考

function setHTMLUnsafe(html: string)

参数

html

string

继承自 HTMLElement.setHTMLUnsafe

setPointerCapture(number)

setPointerCapture()未来指针事件的捕获目标的方法。

MDN 参考

function setPointerCapture(pointerId: number)

参数

pointerId

number

继承自 HTMLElement.setPointerCapture

showPopover()

showPopover() HTMLElement 接口的方法通过将其添加到顶层来显示一个Popover_API元素(即具有有效popover属性的元素)。

MDN 参考

function showPopover()

继承自 HTMLElement.showPopover

toggleAttribute(string, boolean)

在 toggleAttribute() 给定元素上添加当前和添加它的方法( 如果不存在)。

MDN 参考

function toggleAttribute(qualifiedName: string, force?: boolean): boolean

参数

qualifiedName

string

force

boolean

返回

boolean

继承自 HTMLElement.toggleAttribute

togglePopover(boolean)

togglePopover() HTMLElement 接口的方法在隐藏状态和显示状态之间切换Popover_API元素(即具有有效popover属性)。

MDN 参考

function togglePopover(options?: boolean): boolean

参数

options

boolean

返回

boolean

继承自 HTMLElement.togglePopover

webkitMatchesSelector(string)

警告

现已弃用此 API。

This is a legacy alias of matches.

MDN Reference

function webkitMatchesSelector(selectors: string): boolean

参数

selectors

string

返回

boolean

继承自 HTMLElement.webkitMatchesSelector