JavaScript Tutorial/Document/linkColor

Материал из Web эксперт
Перейти к: навигация, поиск

document.linkColor

The linkColor property specifies the color of unvisited links.

The color is expressed as a string in hexadecimal digits or as one of the JavaScript standard color names.

The hexadecimal form is made up of 6 digits that follow the pattern "RRGGBB."



<html>
    <a href="http://www.wbex.ru">wbex.ru</a><br>
    <script language="JavaScript">
    <!--
    document.linkColor="00ff00";
    -->
    </script>
    <a href="http://www.wbex.ru">wbex.ru</a>
    </html>


document.linkColor in action

<HTML>
<head>
<title>this is a title</title>
</head>
<BODY bgcolor="beige" text= "black" link="darkblue" vlink="honeydew">
<SCRIPT language="JavaScript">
<!--
document.write("The link color is "+document.linkColor+"<BR>");
//-->
</SCRIPT>
</BODY>
</HTML>