앵커 속성 _
예시
링크의 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 참조: HTML <a> rel 속성
❮ 앵커 개체