Liên kết Thuộc tính rel
Thí dụ
Trả lại mối quan hệ giữa tài liệu hiện tại và tài liệu được liên kết:
var x = document.getElementById("myLink").rel;
Định nghĩa và Cách sử dụng
Thuộc tính rel đặt hoặc trả về một danh sách được phân tách bằng dấu cách xác định mối quan hệ giữa tài liệu hiện tại và tài liệu được liên kết.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
rel | Yes | Yes | Yes | Yes | Yes |
Cú pháp
Trả lại thuộc tính rel:
linkObject.rel
Đặt thuộc tính rel:
linkObject.rel = relationship
Giá trị tài sản
Value | Description |
---|---|
alternate | Linked page is an alternative version of the current document |
appendix | Linked page is the appendix page for the current document |
chapter | Refers to a chapter |
contents | Linked page is the table of contents for the current document |
copyright | Linked page is the copyright/policy for the current document |
glossary | Linked page is the glossary page for the current document |
help | Linked page is the help page for the current document |
icon | Refers to an icon location |
index | Linked page is the index page for the current document |
next | Refers to the next page |
offline | Refers to a location that contains a path to the CDF file |
prev | Refers to the previous page |
search | Refers to an XML file in OpenSearch description format |
section | Link to a section in a list of documents |
sidebar | Refers to the bookmark panel |
start | Refers to the first page (used by search engines to show the first page) |
stylesheet | Linked page is the style sheet for the current document |
subsection | Linked page is a subsection for the current document |
Chi tiết kỹ thuật
Giá trị trả lại: | Chuỗi, đại diện cho danh sách các loại mối quan hệ được phân tách bằng dấu cách |
---|
Các trang liên quan
Tham chiếu HTML: HTML <link> thuộc tính rel
❮ Đối tượng liên kết