HTMLLIElement

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.

HTMLLIElement 接口公开了特定的属性和方法 (超出了常规 HTMLElement 接口所定义的接口,它通过继承可用于操作列表元素。

must be a string

属性

从其父级 HTMLElement 继承属性。

HTMLLIElement.type 已弃用

DOMString表示项目符号的类型 "disc""square""circle"。由于定义列表类型的标准方法是通过 CSS list-style-type属性,应当使用 CSSOM 方法通过脚本设置它。

HTMLLIElement.value

long指示给定<ol>列表元素的序号位置。它反映了 HTML <li>元素的value属性,并且可以小于0。如果<li>元素不是<ol>元素的子元素,则该属性没有意义。

方法

没有具体方法; 从其父级 HTMLElement 继承属性。

规范

Specification
HTML
# htmllielement

浏览器兼容性

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
HTMLLIElement
type
Deprecated
value

Legend

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

Full support
Full support
Deprecated. Not for use in new websites.
See implementation notes.

参见

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