Ol start attribute
Definition and usage
start
Sets or returns the value of the start attribute of the ordered list.
ol start attribute Define the starting value of the first list item in the ordered list.
See also:
HTML 参考手册:HTML <ol> ট্যাগ
Example
Example 1
Set the starting value of the ordered list to "100":
document.getElementById("myOl").start = "100";
Example 2
Return the value of the first list item in the ordered list:
var x = document.getElementById("myOl").start;
Example 3
When using Roman numerals (type="I"), set the starting value of the ordered list to "5":
document.getElementById("myOl").start = "5";
Syntax
return start property:
olObject.start
设置 start 属性:
olObject.start = number
属性值
值 | 描述 |
---|---|
number | 规定有序列表中第一项的起始值。 |
技术细节
返回值: | 数值,表示有序列表中第一个列表项的起始值。 |
---|
浏览器支持
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
支持 | 支持 | 支持 | 支持 | 支持 |
相关页面
HTML 参考手册:HTML <ol> start প্রতিশব্দ