Anchor rel Özellik
Örnek
Bir bağlantının rel niteliğinin değerini döndürün:
var x = document.getElementById("myAnchor").rel;
Tanım ve Kullanım
rel özelliği, bir bağlantının rel niteliğinin değerini ayarlar veya döndürür.
rel niteliği, geçerli belge ile bağlantılı belge arasındaki ilişkiyi belirtir.
Tarayıcı Desteği
Property | |||||
---|---|---|---|---|---|
rel | Yes | Yes | Yes | Yes | Yes |
Sözdizimi
rel özelliğini döndür:
anchorObject.rel
rel özelliğini ayarlayın:
anchorObject.rel = "value"
Mülk değerleri
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 |
Teknik detaylar
Geri dönüş değeri: | Geçerli belge ile bağlantılı belge arasındaki ilişkiyi temsil eden bir Dize |
---|
Daha fazla örnek
Örnek
rel niteliğinin değerini "nofollow" olarak ayarlayın:
document.getElementById("myAnchor").rel = "nofollow";
İlgili Sayfalar
HTML referansı: HTML <a> rel niteliği
❮ Çapa Nesnesi