IPowerBiElement interface

Extends

HTMLElement

屬性

classList

這是一個 Element.classList 唯讀屬性,會回傳一個活的 DOMTokenList 集合,包含 class 該元素的屬性。

MDN 參考

part

part Element 介面的屬性代表該元素的零件識別碼(即使用 屬性part設定),以 DOMTokenList 形式回傳。

MDN 參考

powerBiEmbed
style

MDN 參考

textContent

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

節點介面的唯 baseURI 讀特性會回傳包含該節點的文件的絕對基底 URL。

MDN 參考

CDATA_SECTION_NODE

node 是 CDATASection 節點。

childElementCount

MDN 參考

childNodes

節點介面的唯 childNodes 讀特性會回傳一個活著的子節點,第一個子節點被指派索引 0。

MDN 參考

children

傳回子專案。

MDN 參考

className

該 className 元素的性質。

MDN 參考

clientHeight

clientHeight Element 介面的唯讀屬性對於沒有 CSS 或內嵌版面框的元素為零;否則,則是元素的內部高度(像素單位)。

MDN 參考

clientLeft

Element 介面的 clientLeft 唯讀特性會回傳元素左側邊界的寬度(以像素為單位)。

MDN 參考

clientTop

clientTop Element 介面的唯讀特性會回傳元素頂端邊框的寬度(以像素為單位)。

MDN 參考

clientWidth

clientWidth Element 介面的唯讀特性對於內嵌元素和沒有 CSS 的元素為零;否則,則是元素的內寬度(以像素為單位)。

MDN 參考

COMMENT_NODE

node 是批注節點。

contentEditable

MDN 參考

currentCSSZoom

currentCSSZoom Element 介面的唯讀特性提供元素的「有效」CSS,zoom並考慮對元素及其所有父元素的縮放。

MDN 參考

dataset

MDN 參考

dir

屬性 HTMLElement.dir 表示當前元素內容的文字書寫方向性。

MDN 參考

DOCUMENT_FRAGMENT_NODE

node 是 DocumentFragment 節點。

DOCUMENT_NODE

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

HTMLElement 介面的特性會 draggable 取得並設定一個布林原語,指示該元素是否可拖曳。

MDN 參考

ELEMENT_NODE

node 是元素。

enterKeyHint

MDN 參考

ENTITY_NODE
ENTITY_REFERENCE_NODE
firstChild

節點介面的唯 firstChild 讀特性會回傳該節點在樹中的第一個子節點,或 null 如果節點沒有子節點。

MDN 參考

firstElementChild

傳回專案的第一個子系,否則傳回 null。

MDN 參考

hidden

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

MDN 參考

id

id元素介面的屬性代表元素的識別碼,反映全域屬性。id

MDN 參考

inert

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

MDN 參考

innerHTML

元素介面的屬性會 innerHTML 取得或設定元素中包含的 HTML 或 XML 標記。

MDN 參考

innerText

innerText HTMLElement 介面的屬性代表節點及其後代節點的渲染文字內容。

MDN 參考

inputMode

MDN 參考

isConnected

Node 介面的唯 isConnected 讀特性會回傳一個布林值,指示該節點是否直接或間接連接到文件物件。

MDN 參考

isContentEditable

MDN 參考

lang

lang HTMLElement 介面的特性以 MISSING: RFC(5646, 'BCP 47 語言識別標籤')表示元素屬性值與文字內容的基底語言。

MDN 參考

lastChild

節點介面的唯 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

節點介面的唯 nodeType 讀特性是一個整數,用來識別節點的本質。

MDN 參考

nodeValue

nodeValue節點介面的特性會回傳或設定目前節點的值。

MDN 參考

nonce

MDN 參考

NOTATION_NODE
offsetHeight

HTMLElement 介面的唯讀特性以 offsetHeight 整數形式回傳元素的高度,包括垂直填充與邊框。

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元素DOM介面的屬性會取得描述該元素及其後代的序列化HTML片段。

MDN 參考

outerText

outerText HTMLElement 介面的屬性回傳與 HTMLElement.innerText 相同的值。

MDN 參考

ownerDocument

節點介面的唯讀 ownerDocument 特性會回傳該節點的頂層文件物件。

MDN 參考

parentElement

Node 介面的唯 parentElement 讀特性會回傳 DOM 節點的父元素,或 null 如果該節點沒有父節點,或其父節點不是 DOM 元素,則會回傳。

MDN 參考

parentNode

節點介面的唯 parentNode 讀特性會回傳指定節點在 DOM 樹中的父節點。

MDN 參考

popover

HTMLElement 介面的特性透過 popover JavaScript'auto'(、、 'hint'或 'manual')取得並設定元素的彈出狀態,可用於特徵偵測。

MDN 參考

prefix

Element.prefix唯讀特性會回傳指定元素的命名空間前綴,或null若未指定前綴則回傳。

MDN 參考

previousElementSibling

傳回元素的第一個上一個同層級,否則傳回 null。

MDN 參考

previousSibling

節點介面的唯 previousSibling 讀特性會回傳其父節點中緊鄰指定的節點,或 null 若該指定節點是該清單中的第一個節點。

MDN 參考

PROCESSING_INSTRUCTION_NODE

node 是 ProcessingInstruction 節點。

role

MDN 參考

scrollHeight

scrollHeight Element 介面的唯讀特性是衡量元素內容高度,包括因溢位而無法在螢幕上顯示的內容。

MDN 參考

scrollLeft

scrollLeft元素介面的特性會取得或設定元素內容從左邊滾動的像素數。

MDN 參考

scrollTop

scrollTop元素介面的特性會取得或設定元素內容從其頂端捲動的像素數。

MDN 參考

scrollWidth

scrollWidth Element 介面的唯讀特性是衡量元素內容的寬度,包括因溢位而無法在螢幕上顯示的內容。

MDN 參考

shadowRoot

Element.shadowRoot唯讀屬性代表該元素所承載的陰影根。

MDN 參考

slot

slot Element 介面的特性會回傳該元素插入的陰影 DOM 插槽名稱。

MDN 參考

spellcheck

spellcheck HTMLElement 介面的屬性代表一個布林值,用以控制拼字檢查提示。

MDN 參考

tabIndex

MDN 參考

tagName

tagName Element 介面的唯讀特性會回傳呼叫該元素的標籤名稱。

MDN 參考

TEXT_NODE

node 是 Text 節點。

title

屬性 HTMLElement.title 代表元素的標題:當滑鼠移到節點上時,文字通常會以「提示」彈出視窗顯示。

MDN 參考

translate

translate HTMLElement 介面的特性會指示在頁面本地化時,是否要翻譯元素的屬性值及其 Text 節點子節點的值,還是保持不變。

MDN 參考

writingSuggestions

writingSuggestions HTMLElement 介面的屬性是一個字串,指示是否應在元素範圍內啟用瀏覽器提供的寫作建議。

MDN 參考

繼承的方法

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)
addEventListener<K>(K, (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, boolean | AddEventListenerOptions)
after((string | Node)[])

在節點後面插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “HierarchyRequestError” DOMException。

MDN 參考

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

MDN 參考

append((string | Node)[])

在節點的最後一個子系之後插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “HierarchyRequestError” DOMException。

MDN 參考

appendChild<T>(T)

appendChild()節點介面的方法將節點加入指定父節點子節點清單的末尾。

MDN 參考

attachInternals()

該方法回 HTMLElement.attachInternals() 傳一個 ElementInternals 物件。

MDN 參考

attachShadow(ShadowRootInit)

該 Element.attachShadow() 方法會將陰影 DOM 樹附加到指定元素,並回傳其 ShadowRoot 的參考。

MDN 參考

before((string | Node)[])

在節點之前插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “HierarchyRequestError” DOMException。

MDN 參考

blur()

MDN 參考

checkVisibility(CheckVisibilityOptions)

checkVisibility()元素介面的方法檢查該元素是否可見。

MDN 參考

click()

此 HTMLElement.click() 方法模擬滑鼠點擊元素的動作。

MDN 參考

cloneNode(boolean)

cloneNode()節點介面的方法會回傳該方法所呼叫的節點的副本。

MDN 參考

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

closest()元素介面的方法會遍歷元素及其父節點(朝向文件根節點),直到找到符合指定 CSS 選擇器的節點。

MDN 參考

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

compareDocumentPosition()節點介面的方法會回報其參數節點相對於被呼叫節點的位置。

MDN 參考

computedStyleMap()

computedStyleMap()元素介面的方法會回傳一個 StylePropertyMapReadOnly 介面,提供一個唯讀的 CSS 宣告區塊表示,作為 CSSStyleDeclaration 的替代方案。

MDN 參考

contains(Node | null)

contains()節點介面的方法回傳一個布林值,表示節點是否為特定節點的後代,即該節點本身、其直接子節點之一(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() 方法回傳活函數:搜尋指定元素的所有後代,但不會搜尋該元素本身。

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()元素介面的方法會回傳一個布林值,表示目前元素是否擁有指定屬性及其命名空間。

MDN 參考

hasAttributes()

hasAttributes() Element 介面的方法會回傳一個布林值,表示目前元素是否擁有任何屬性。

MDN 參考

hasChildNodes()

hasChildNodes()節點介面的方法會回傳一個布林值,指示該節點是否有子節點。

MDN 參考

hasPointerCapture(number)

hasPointerCapture()指針捕獲方法,指針由給定指標 ID 所識別。

MDN 參考

hidePopover()

hidePopover() HTMLElement 介面的方法透過將彈出元素(即具有有效popover屬性的物件)從頂層移除並以 display: noneS 樣式化來隱藏。

MDN 參考

insertAdjacentElement(InsertPosition, Element)

相 insertAdjacentElement() 對於所引用元素的方法。

MDN 參考

insertAdjacentHTML(InsertPosition, string)

將 insertAdjacentHTML() 結果節點在指定位置進入 DOM 樹的方法。

MDN 參考

insertAdjacentText(InsertPosition, string)

insertAdjacentText()元素介面的方法,給定相對位置和一個字串,會在相對於該元素的位置插入一個新的文字節點。

MDN 參考

insertBefore<T>(T, Node | null)

insertBefore()節點介面的方法是將節點插入於參考節點之前,作為指定父節點的子節點。

MDN 參考

isDefaultNamespace(string | null)

isDefaultNamespace() Node 介面的方法接受命名空間 URI 作為參數。

MDN 參考

isEqualNode(Node | null)

isEqualNode()節點介面的方法測試兩個節點是否相等。

MDN 參考

isSameNode(Node | null)

isSameNode()節點介面的方法是一個傳統別名,用於嚴格===等號運算子。

MDN 參考

lookupNamespaceURI(string | null)

lookupNamespaceURI()節點介面的方法以前綴為參數,並在找到時回傳該節點對應的命名空間 URI(null若未找到則回傳)。

MDN 參考

lookupPrefix(string | null)

lookupPrefix() Node 介面的方法會回傳包含指定命名空間 URI 前綴的字串(若有null),若無則回傳。

MDN 參考

matches(string)

matches()元素介面的方法測試該元素是否會被指定的 CSS 選擇器選擇。

MDN 參考

normalize()

normalize()節點介面的方法將指定的節點及其所有子樹置於正規化形式。

MDN 參考

prepend((string | Node)[])

在節點的第一個子系之前插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “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()元素介面的方法會從元素中移除指定的 Attr 節點。

MDN 參考

removeAttributeNS(string | null, string)

removeAttributeNS()如果你在處理 HTML,且不需要指定請求屬性為特定命名空間的一部分,請使用 Element.removeAttribute() 方法。

MDN 參考

removeChild<T>(T)

removeChild()節點介面的方法會從 DOM 中移除一個子節點,並回傳被移除的節點。

MDN 參考

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)
removeEventListener<K>(K, (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, boolean | EventListenerOptions)
replaceChild<T>(Node, T)

replaceChild()節點介面的方法會替換給定(父)節點中的子節點。

MDN 參考

replaceChildren((string | Node)[])

將節點的所有子系取代為節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “HierarchyRequestError” DOMException。

MDN 參考

replaceWith((string | Node)[])

以節點取代節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “HierarchyRequestError” DOMException。

MDN 參考

requestFullscreen(FullscreenOptions)

此 Element.requestFullscreen() 方法會發出非同步請求,使元素以全螢幕模式顯示。

MDN 參考

requestPointerLock(PointerLockOptions)

requestPointerLock() Element 介面的方法允許你非同步請求將指標鎖定在指定元素上。

MDN 參考

scroll(number, number)
scroll(ScrollToOptions)

scroll()元素介面的方法將元素捲動到特定元素內的特定座標集合。

MDN 參考

scrollBy(number, number)
scrollBy(ScrollToOptions)

scrollBy()元素介面的方法是以指定數量滾動元素。

MDN 參考

scrollIntoView(boolean | ScrollIntoViewOptions)

元素介面的方法 scrollIntoView() 會捲動元素的祖先容器,使得被呼叫的元素 scrollIntoView() 對使用者可見。

MDN 參考

scrollTo(number, number)
scrollTo(ScrollToOptions)

scrollTo()元素介面的方法會捲動到特定元素內的特定座標集合。

MDN 參考

setAttribute(string, string)

setAttribute()元素介面的方法設定指定元素屬性的值。

MDN 參考

setAttributeNode(Attr)

setAttributeNode() Element 介面的方法會在指定的元素中新增一個 Attr 節點。

MDN 參考

setAttributeNodeNS(Attr)

setAttributeNodeNS() Element 介面的方法會在元素中新增一個命名空間的 Attr 節點。

MDN 參考

setAttributeNS(string | null, string, string)

setAttributeNS 新增屬性或改變屬性的值,並使用指定命名空間與名稱。

MDN 參考

setHTMLUnsafe(string)

setHTMLUnsafe()元素介面的方法用於將 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)

屬性詳細資料

classList

這是一個 Element.classList 唯讀屬性,會回傳一個活的 DOMTokenList 集合,包含 class 該元素的屬性。

MDN 參考

DOMTokenList classList

屬性值

DOMTokenList

part

part Element 介面的屬性代表該元素的零件識別碼(即使用 屬性part設定),以 DOMTokenList 形式回傳。

MDN 參考

DOMTokenList part

屬性值

DOMTokenList

powerBiEmbed

powerBiEmbed: Embed

屬性值

Embed

style

MDN 參考

CSSStyleDeclaration style

屬性值

CSSStyleDeclaration

textContent

MDN 參考

string textContent

屬性值

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.aria點字標籤

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(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.aria描述

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.aria相關

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

節點介面的唯 baseURI 讀特性會回傳包含該節點的文件的絕對基底 URL。

MDN 參考

baseURI: string

屬性值

string

繼承自 HTMLElement.baseURI

CDATA_SECTION_NODE

node 是 CDATASection 節點。

CDATA_SECTION_NODE: 4

屬性值

4

繼承自 HTMLElement.CDATA_SECTION_NODE

childElementCount

MDN 參考

childElementCount: number

屬性值

number

繼承自 HTMLElement.childElementCount

childNodes

節點介面的唯 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 Element 介面的唯讀屬性對於沒有 CSS 或內嵌版面框的元素為零;否則,則是元素的內部高度(像素單位)。

MDN 參考

clientHeight: number

屬性值

number

繼承自 HTMLElement.clientHeight

clientLeft

Element 介面的 clientLeft 唯讀特性會回傳元素左側邊界的寬度(以像素為單位)。

MDN 參考

clientLeft: number

屬性值

number

繼承自 HTMLElement.clientLeft

clientTop

clientTop Element 介面的唯讀特性會回傳元素頂端邊框的寬度(以像素為單位)。

MDN 參考

clientTop: number

屬性值

number

繼承自 HTMLElement.clientTop

clientWidth

clientWidth Element 介面的唯讀特性對於內嵌元素和沒有 CSS 的元素為零;否則,則是元素的內寬度(以像素為單位)。

MDN 參考

clientWidth: number

屬性值

number

繼承自 HTMLElement.clientWidth

COMMENT_NODE

node 是批注節點。

COMMENT_NODE: 8

屬性值

8

繼承自 HTMLElement.COMMENT_NODE

contentEditable

MDN 參考

contentEditable: string

屬性值

string

繼承自 HTMLElement.contentEditable

currentCSSZoom

currentCSSZoom Element 介面的唯讀特性提供元素的「有效」CSS,zoom並考慮對元素及其所有父元素的縮放。

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

node 是 DocumentFragment 節點。

DOCUMENT_FRAGMENT_NODE: 11

屬性值

11

繼承自 HTMLElement.DOCUMENT_FRAGMENT_NODE

DOCUMENT_NODE

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

HTMLElement 介面的特性會 draggable 取得並設定一個布林原語,指示該元素是否可拖曳。

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

節點介面的唯 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元素介面的屬性代表元素的識別碼,反映全域屬性。id

MDN 參考

id: string

屬性值

string

繼承自 HTMLElement.id

inert

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

MDN 參考

inert: boolean

屬性值

boolean

繼承自 HTMLElement.inert

innerHTML

元素介面的屬性會 innerHTML 取得或設定元素中包含的 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 讀特性會回傳一個布林值,指示該節點是否直接或間接連接到文件物件。

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

節點介面的唯 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

節點介面的唯 nodeType 讀特性是一個整數,用來識別節點的本質。

MDN 參考

nodeType: number

屬性值

number

繼承自 HTMLElement.nodeType

nodeValue

nodeValue節點介面的特性會回傳或設定目前節點的值。

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

HTMLElement 介面的唯讀特性以 offsetHeight 整數形式回傳元素的高度,包括垂直填充與邊框。

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.ontoggle

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元素DOM介面的屬性會取得描述該元素及其後代的序列化HTML片段。

MDN 參考

outerHTML: string

屬性值

string

繼承自 HTMLElement.outerHTML

outerText

outerText HTMLElement 介面的屬性回傳與 HTMLElement.innerText 相同的值。

MDN 參考

outerText: string

屬性值

string

繼承自 HTMLElement.outerText

ownerDocument

節點介面的唯讀 ownerDocument 特性會回傳該節點的頂層文件物件。

MDN 參考

ownerDocument: Document

屬性值

繼承自 HTMLElement.ownerDocument

parentElement

Node 介面的唯 parentElement 讀特性會回傳 DOM 節點的父元素,或 null 如果該節點沒有父節點,或其父節點不是 DOM 元素,則會回傳。

MDN 參考

parentElement: HTMLElement | null

屬性值

HTMLElement | null

繼承自 HTMLElement.parentElement

parentNode

節點介面的唯 parentNode 讀特性會回傳指定節點在 DOM 樹中的父節點。

MDN 參考

parentNode: ParentNode | null

屬性值

ParentNode | null

繼承自 HTMLElement.parentNode

popover

HTMLElement 介面的特性透過 popover 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

節點介面的唯 previousSibling 讀特性會回傳其父節點中緊鄰指定的節點,或 null 若該指定節點是該清單中的第一個節點。

MDN 參考

previousSibling: ChildNode | null

屬性值

ChildNode | null

繼承自 HTMLElement.previousSibling

PROCESSING_INSTRUCTION_NODE

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元素介面的特性會取得或設定元素內容從左邊滾動的像素數。

MDN 參考

scrollLeft: number

屬性值

number

繼承自 HTMLElement.scrollLeft

scrollTop

scrollTop元素介面的特性會取得或設定元素內容從其頂端捲動的像素數。

MDN 參考

scrollTop: number

屬性值

number

繼承自 HTMLElement.scrollTop

scrollWidth

scrollWidth Element 介面的唯讀特性是衡量元素內容的寬度,包括因溢位而無法在螢幕上顯示的內容。

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

node 是 Text 節點。

TEXT_NODE: 3

屬性值

3

繼承自 HTMLElement.TEXT_NODE 的

title

屬性 HTMLElement.title 代表元素的標題:當滑鼠移到節點上時,文字通常會以「提示」彈出視窗顯示。

MDN 參考

title: string

屬性值

string

繼承自 HTMLElement.title

translate

translate HTMLElement 介面的特性會指示在頁面本地化時,是否要翻譯元素的屬性值及其 Text 節點子節點的值,還是保持不變。

MDN 參考

translate: boolean

屬性值

boolean

繼承自 HTMLElement.translate

writingSuggestions

writingSuggestions HTMLElement 介面的屬性是一個字串,指示是否應在元素範圍內啟用瀏覽器提供的寫作建議。

MDN 參考

writingSuggestions: string

屬性值

string

繼承自 HTMLElement.writing建議

繼承的方法的詳細資料

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)

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

參數

type

string

listener

EventListenerOrEventListenerObject

options

boolean | AddEventListenerOptions

繼承自 HTMLElement.addEventListener

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

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

參數

type

K

listener

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

options

boolean | AddEventListenerOptions

繼承自 HTMLElement.addEventListener

after((string | Node)[])

在節點後面插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “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)[])

在節點的最後一個子系之後插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “HierarchyRequestError” DOMException。

MDN 參考

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

參數

nodes

(string | Node)[]

繼承自 HTMLElement.append

appendChild<T>(T)

appendChild()節點介面的方法將節點加入指定父節點子節點清單的末尾。

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)[])

在節點之前插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “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)

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)

compareDocumentPosition()節點介面的方法會回報其參數節點相對於被呼叫節點的位置。

MDN 參考

function compareDocumentPosition(other: Node): number

參數

other

Node

傳回

number

繼承自 HTMLElement.compareDocumentPosition

computedStyleMap()

computedStyleMap()元素介面的方法會回傳一個 StylePropertyMapReadOnly 介面,提供一個唯讀的 CSS 宣告區塊表示,作為 CSSStyleDeclaration 的替代方案。

MDN 參考

function computedStyleMap(): StylePropertyMapReadOnly

傳回

StylePropertyMapReadOnly

繼承自 HTMLElement.computedStyleMap

contains(Node | null)

contains()節點介面的方法回傳一個布林值,表示節點是否為特定節點的後代,即該節點本身、其直接子節點之一(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() 方法回傳活函數:搜尋指定元素的所有後代,但不會搜尋該元素本身。

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()元素介面的方法會回傳一個布林值,表示目前元素是否擁有指定屬性及其命名空間。

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()

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: noneS 樣式化來隱藏。

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)

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()節點介面的方法測試兩個節點是否相等。

MDN 參考

function isEqualNode(otherNode: Node | null): boolean

參數

otherNode

Node | null

傳回

boolean

繼承自 HTMLElement.isEqualNode

isSameNode(Node | null)

isSameNode()節點介面的方法是一個傳統別名,用於嚴格===等號運算子。

MDN 參考

function isSameNode(otherNode: Node | null): boolean

參數

otherNode

Node | null

傳回

boolean

繼承自 HTMLElement.isSameNode

lookupNamespaceURI(string | null)

lookupNamespaceURI()節點介面的方法以前綴為參數,並在找到時回傳該節點對應的命名空間 URI(null若未找到則回傳)。

MDN 參考

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

參數

prefix

string | null

傳回

string | null

繼承自 HTMLElement.lookupNamespaceURI

lookupPrefix(string | null)

lookupPrefix() Node 介面的方法會回傳包含指定命名空間 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()

normalize()節點介面的方法將指定的節點及其所有子樹置於正規化形式。

MDN 參考

function normalize()

繼承自 HTMLElement.normalize

prepend((string | Node)[])

在節點的第一個子系之前插入節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “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()元素介面的方法會從元素中移除指定的 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()節點介面的方法會從 DOM 中移除一個子節點,並回傳被移除的節點。

MDN 參考

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

參數

child

T

傳回

T

繼承自 HTMLElement.removeChild

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)

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

參數

type

string

listener

EventListenerOrEventListenerObject

options

boolean | EventListenerOptions

繼承自 HTMLElement.removeEventListener

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

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

參數

type

K

listener

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

options

boolean | EventListenerOptions

繼承自 HTMLElement.removeEventListener

replaceChild<T>(Node, T)

replaceChild()節點介面的方法會替換給定(父)節點中的子節點。

MDN 參考

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

參數

node

Node

child

T

傳回

T

繼承自 HTMLElement.replaceChild

replaceChildren((string | Node)[])

將節點的所有子系取代為節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “HierarchyRequestError” DOMException。

MDN 參考

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

參數

nodes

(string | Node)[]

繼承自 HTMLElement.replaceChildren

replaceWith((string | Node)[])

以節點取代節點,同時以對等的 Text 節點取代節點中的字串。

如果違反節點樹狀結構的條件約束,則會擲回 “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()元素介面的方法將元素捲動到特定元素內的特定座標集合。

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()元素介面的方法是以指定數量滾動元素。

MDN 參考

function scrollBy(options?: ScrollToOptions)

參數

options

ScrollToOptions

繼承自 HTMLElement.scrollBy

scrollIntoView(boolean | ScrollIntoViewOptions)

元素介面的方法 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()元素介面的方法設定指定元素屬性的值。

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()元素介面的方法用於將 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