Document:alinkColor 属性
Deprecated
Avoid using this feature in new projects. Document color attributes are superseded by CSS. This feature may be a candidate for removal from web standards or browsers.>
Consider using the following features instead: background-color、Color、CSS object model或getComputedStyle().>
返回或设置文档正文中活动链接的颜色。在 mousedown 和 mouseup 事件之间,链接处于活动状态。
值
包含颜色名称(例如 blue、darkblue 等)或颜色十六进制值(例如 #0000FF)的字符串。
备注
Mozilla Firefox 中该属性的默认值为红色(十六进制 #ee0000)。
在 DOM 第 2 版 HTML 中 document.alinkColor 已弃用。一种替代方法是 CSS 选择器 :active。
另一种替代方法是 document.body.aLink,不过这种方法已在 HTML 4.01 中弃用,转而使用 CSS 替代方法。
Firefox 同时支持 alinkColor/:active 和 :focus。
规范
| 规范 |
|---|
| HTML> # dom-document-alinkcolor> |