Đối tượng HTML DOM Ol
Đối tượng Ol
Đối tượng Ol đại diện cho phần tử HTML <ol>.
Truy cập một đối tượng Ol
Bạn có thể truy cập phần tử <ol> bằng cách sử dụng getElementById():
Tạo một đối tượng Ol
Bạn có thể tạo phần tử <ol> bằng cách sử dụng phương thức document.createElement():
Thuộc tính đối tượng Ol
Property | Description |
---|---|
compact | Not supported in HTML5. Use style.lineHeight instead. Sets or returns whether the list should render smaller than normal, or not |
reversed | Sets or returns whether the list order should be descending or not |
start | Sets or returns the value of the start attribute of an ordered list |
type | Sets or returns the value of the type attribute of an ordered list |
Thuộc tính và sự kiện tiêu chuẩn
Đối tượng Ol cũng hỗ trợ các thuộc tính và sự kiện tiêu chuẩn.
Trang liên quan
Tham chiếu HTML: thẻ HTML <ol>