JavaScript Reference/Javascript Properties/fgColor
"fgColor" Example
<source lang="javascript">
<html>
<body>
Sample Text
<button onclick="document.fgColor="red";">Red</button>
<button onclick="document.fgColor="blue";">Blue</button>
</body>
</html>
</source>
"fgColor" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+
</source>
"fgColor" Syntax and Note
<source lang="javascript">
Note: Read and write property. Sets the text colort.
Value: Web color name or hexadecimal value in #RRGGBB format.
Syntax:
document.fgColor = value document.body.fgColor = value // NN6, IE
</source>