JavaScript Reference/Javascript Properties/linkColor

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

"linkColor" Example

   <source lang="javascript">
   

<html> <body onload="document.body.link = "blue";"> <script language="JavaScript"> function function1() {

   document.linkColor = "green";

} </script> <a href="http://www.wbex.ru">wbex.ru Web page</a> <input type="button" value="Change the link color to green" onClick="function1();"> </body> </html>


     </source>
   
  


"linkColor" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |document | +----------------+--------------------------------------------------------------+

     </source>
   
  


"linkColor" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets the link color. "Link" property applies to the <body> element, This property applies to the document object.

Value: Web color name or hexadecimal value in #RRGGBB format.

Syntax:

document.linkColor = value


     </source>