Đối tượng nhân sự HTML DOM
Đối tượng nhân sự
Đối tượng HR đại diện cho một phần tử HTML <hr>.
Truy cập một Đối tượng Nhân sự
Bạn có thể truy cập phần tử <hr> bằng cách sử dụng getElementById ():
Thí dụ
var x = document.getElementById("myHR");
Tạo một Đối tượng Nhân sự
Bạn có thể tạo một phần tử <hr> bằng cách sử dụng phương thức document.createElement ():
Thí dụ
var x = document.createElement("HR");
Thuộc tính đối tượng HR
Property | Description |
---|---|
align | Not supported in HTML5. Use style.textAlign instead. Sets or returns the alignment of a horizontal line |
color | Not supported in HTML5. Use style.color instead. Sets or returns the color of a horizontal line |
noshade | Not supported in HTML5. Sets or returns whether a horizontal line should render in one solid color (noshaded) |
size | Not supported in HTML5. Use style.height instead. Sets or returns the height of a horizontal line |
width | Not supported in HTML5. Use style.width instead. Sets or returns the width of a horizontal line |
Thuộc tính và sự kiện tiêu chuẩn
Đối tượng HR cũng hỗ trợ các thuộc tính và sự kiện tiêu chuẩn .
Các trang liên quan
Tham chiếu HTML: Thẻ <hr> HTML