خاصية Anchor rel
مثال
إرجاع قيمة السمة rel للارتباط:
var x = document.getElementById("myAnchor").rel;
التعريف والاستخدام
تحدد الخاصية rel أو تعرض قيمة السمة rel للارتباط.
تحدد السمة rel العلاقة بين الوثيقة الحالية والمستند المرتبط.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
rel | Yes | Yes | Yes | Yes | Yes |
بناء الجملة
إعادة الخاصية rel:
anchorObject.rel
قم بتعيين خاصية rel:
anchorObject.rel = "value"
قيم الملكية
Value | Description |
---|---|
alternate | An alternate version of the document (i.e. print page, translated or mirror) |
author | The author of the document |
bookmark | A related document |
help | A help document |
licence | Copyright information for the document |
next | The next document in a selection |
nofollow | "nofollow" is used by Google, to specify that the Google search spider should not follow that link (mostly used for paid links) |
noreferrer | Specifies that the browser should not send a HTTP referer header if the user follows the hyperlink |
prefetch | Specifies that the target document should be cached |
prev | The previous document in a selection |
search | A search tool for the document |
tag | A tag (keyword) for the current document |
تفاصيل تقنية
قيمة الإرجاع: | سلسلة ، تمثل العلاقة بين الوثيقة الحالية والمستند المرتبط |
---|
مزيد من الأمثلة
مثال
عيّن قيمة السمة rel على "nofollow":
document.getElementById("myAnchor").rel = "nofollow";
الصفحات ذات الصلة
مرجع HTML: سمة rel لـ HTML <a>
❮ مرساة الكائن