JavaScript Reference/Javascript Properties/fgColor — различия между версиями

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

Текущая версия на 11:21, 26 мая 2010

"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>