document Properties Object Properties Summary
Sets or retrieves the color for all active links in the document.
HTML |
N/A |
Script |
document.alinkColor [ = sColor ] |
sColor |
String that specifies one of the color names or red-green-blue ( RGB ) values in the Color Table. Note Specifying the color as a color name may not be recognized by some browsers, whereas the RGB color value should always be displayed accurately. |
The property is read/write with a default value of #0000ff, and is the returned value if the property has not been set.
This example code fragment assigns the document's active link color to a variable named aColor and displays it in a message box.
aColor = document.alinkColor;
alert ( "Active link color is set to " + aColor );
Show me
document
linkColor, vLinkColor