document.fgColor : fgColor « Document « JavaScript Tutorial






The fgColor property specifies the default text color.

This is equivalent to assigning the color to the text attribute in the tag.

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>
<head>
<title>this is a title</title>
</head>
<BODY bgcolor="beige" text= "black" link="darkblue" vlink="honeydew">

<SCRIPT language="JavaScript">
<!--

document.write("The text color is "+document.fgColor+"<BR>");

//-->
</SCRIPT>

</BODY>

</HTML>








14.12.fgColor
14.12.1.document.fgColor
14.12.2.Set the document.fgColor (IE)