Полезная информация

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference

Document.fgColor Property


Document.fgColor Property---the default text color


Navigator 2.0, Internet Explorer 3.0




fgColor is a string property that specifies the default color of text in document. This default color is used for all text in the document except hypertext links and text with an alternate color specified through the COLOR attribute of the HTML <FONT> tag.

The document text color can be set through the TEXT attribute in the <BODY> HTML tag, and the fgColor property will contain the specified value. The default color may also be specified by assigning a value to fgColor directly, but this may only be done in the <HEAD> of the document, before the <BODY> tag is parsed.

Colors are specified either as one of the standard color names recognized by JavaScript, or as red, green, and blue color values, expressed as a string of six hexadecimal digits in the form "RRGGBB".

See Also

"Document", "Document.alinkColor", "Document.bgColor", "Document.linkColor", "Document.vlinkColor", Appendix G, JavaScript and HTML Color Names and Values

Previous Home Next
Document.embeds[] Book Index Document.forms[]

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell