August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.fgColor
The fgColor property specifies the default text color of all the text that appears in a Web document. This is equivalent to assigning the color to the text attribute in the <body> 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."
Listing 7.98 sets the default color of all the text on the page to blue.
<html> <script language="JavaScript"> <!-- Hide //Set the text color to blue. document.fgColor="0000ff"; //Hide End ---> </script> ... |
Read now
Unlock full access