HTMLOListElement:start 属性
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.
HTMLOListElement
接口的 start
属性表示有序列表的起始值,默认值是 1。
备注: start
属性值独立于 HTMLOListElement.type
属性;它总是数字,即使当类型是字母或罗马数字。
值
long
值。
示例
HTML
html
<ol id="order-list">
<li>Fee</li>
<li>Fi</li>
<li>Fo</li>
<li>Fum</li>
</ol>
JavaScript
js
const olElement = document.querySelector("#order-list");
console.log(olElement.start); // 输出:“1”
olElement.start = "11";
console.log(olElement.start); // 输出:“11”
结果
规范
Specification |
---|
HTML # dom-ol-start |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
start |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.