--- title: document.alinkColor slug: Web/API/Document/alinkColor tags: - DOM - Gecko - Gecko DOM Reference translation_of: Web/API/Document/alinkColor ---
{{ ApiRef() }}
{{ Deprecated_header() }} document body에 있는 active link의 색깔을 설정하거나 설정된 값을 리턴합니다. 링크는 mousedown
과 mouseup
이벤트가 발생하는 중간에 활성화(active)됩니다.
color = document.alinkColor document.alinkColor =color
color
는 색깔의 이름을 포함하는 문자열 (e.g., "blue"
, "darkblue"
, etc.) 혹은 색깔의 16진수 값으로 설정할 수 있습니다(e.g., #0000FF
).
The default value for this property in Mozilla Firefox is red (#ee0000
in hexadecimal).
document.alinkColor
is deprecated in DOM Level 2 HTML. One alternative is the CSS selector {{ Cssxref(":active") }}.
Another alternative is document.body.aLink
, although this is deprecated in HTML 4.01 in favor of the CSS alternative.
Gecko supports both alinkColor
/:active
and {{ Cssxref(":focus") }}. Internet Explorer 6 and 7 support alinkColor
/:active
only for HTML anchor (<a>) links and the behavior is the same as :focus
under Gecko. There is no support for :focus
in IE.
{{ DOM0() }}
{{ languages( { "es": "es/DOM/document.alinkColor", "pl": "pl/DOM/document.alinkColor" } ) }}