Document: alinkColor プロパティ

非推奨;: この機能は非推奨になりました。まだ対応しているブラウザーがあるかもしれませんが、すでに関連するウェブ標準から削除されているか、削除の手続き中であるか、互換性のためだけに残されている可能性があります。使用を避け、できれば既存のコードは更新してください。このページの下部にある互換性一覧表を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。

文書本文のアクティブなリンクの色を取得または設定します。リンクは mousedownmouseup イベントの間にアクティブになります。

文字列で、色の名前 (blue, darkblue, など) または色の 16 進値 (#0000FF など) が入ります。

メモ

Mozilla Firefox では、このプロパティの既定値は赤 (16 進で #ee0000) です。

document.alinkColorDOM Level 2 HTML で非推奨となっています。代替方法の一つは CSS セレクターの :active です。

他の代替手段として document.body.alink がありますが、上記の CSS による代替手段が設置されたため HTML 4.01 で非推奨となっています。

Firefox は alinkColor/:active および :focus の両方に対応しています。

仕様書

Specification
HTML
# dom-document-alinkcolor

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
alinkColor
Deprecated

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Deprecated. Not for use in new websites.
Has more compatibility info.