Document: thuộc tính linkColor

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Thuộc tính Document.linkColor lấy/đặt màu của các liên kết trong tài liệu.

Thuộc tính này đã lỗi thời. Thay vào đó, bạn có thể đặt thuộc tính CSS color trên các liên kết neo HTML (<a>) hoặc trên các pseudo-classes :link.

Giá trị

Một chuỗi đại diện cho màu dưới dạng từ (ví dụ: red) hoặc giá trị thập lục phân (ví dụ: #ff0000).

Khi được đặt thành giá trị null, giá trị null đó được chuyển đổi thành chuỗi rỗng (""), vì vậy document.linkColor = null tương đương với document.linkColor = "".

Ví dụ

js
document.linkColor = "blue";

Đặc tả kỹ thuật

Specification
HTML
# dom-document-linkcolor

Tương thích trình duyệt

Giá trị mặc định cho thuộc tính này trong Mozilla Firefox là xanh dương (#0000ee ở hệ thập lục phân).

Xem thêm