Đối tượng HTML DOM Ul
Đối tượng Ul
Đối tượng Ul đại diện cho một phần tử HTML <ul>.
Truy cập một đối tượng Ul
Bạn có thể truy cập một phần tử <ul> bằng cách sử dụng getElementById ():
Thí dụ
var x = document.getElementById("myUL");
Tạo một đối tượng Ul
Bạn có thể tạo một phần tử <ul> bằng cách sử dụng phương thức document.createElement ():
Thí dụ
var x = document.createElement("UL");
Thuộc tính đối tượng Ul
Property | Description |
---|---|
compact | Not supported in HTML5. Use
style.lineHeight instead. Sets or returns whether the unordered list should render smaller than normal, or not |
type | Not supported in HTML5. Use
style.listStyleType instead. Sets or returns the value of the type attribute of an unordered list |
Thuộc tính và sự kiện tiêu chuẩn
Đối tượng Ul hỗ trợ các thuộc tính và sự kiện tiêu chuẩn .
Các trang liên quan
Hướng dẫn HTML: Danh sách HTML
Tham chiếu HTML: thẻ HTML <ul>