HTMLElement
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
HTMLElement 接口表示所有的 HTML 元素。一些 HTML 元素直接实现了 HTMLElement 接口,其他的间接实现 HTMLElement 接口。
属性
继承自父接口 Element
和 GlobalEventHandlers
的属性。
方法
从父元素继承的方法,Element
.
Name & Arguments | Return | Description |
---|---|---|
HTMLElement.blur() |
void |
元素失去焦点 |
HTMLElement.click() |
void |
触发元素的点击事件 |
HTMLElement.focus() |
void |
元素获得焦点 |
HTMLElement.forceSpellCheck()
实验性
|
void |
规范
Specification |
---|
HTML # htmlelement |