HTMLLegendElement

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.

HTMLLegendElement 是一个允许访问 <legend> 元素属性的接口,它从 HTMLElement 接口继承属性和方法。

EventTarget Node Element HTMLElement HTMLLegendElement

实例属性

从其父接口 HTMLElement 继承属性。

HTMLLegendElement.align 已弃用

表示关于表单集对齐的字符串。

HTMLLegendElement.form 只读

表示图例所属的表单的 HTMLFormElement。如果图例有一个 fieldset 元素作为其父元素,则此属性返回与父 form 属性相同的值。否则,它将返回 null

实例方法

没有特定的方法,从其父接口 HTMLElement 继承方法。

规范

Specification
HTML
# htmllegendelement

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
HTMLLegendElement
align
Deprecated
form

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Deprecated. Not for use in new websites.

参见

  • 实现此接口的 HTML 元素:<legend>