document.bgColor : bgColor : Document JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Document » bgColor »

 

document.bgColor












Syntax








document.bgColor



The bgColor property specifies the background color of HTML document.

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 six digits that follow the pattern "RRGGBB."


The color of the background can also be set with bgcolor attribute of the

tag.











<HTML>
<head>
<title>this is a title</title>
</head>
<BODY bgcolor="beige" text= "black" link="darkblue" vlink="honeydew">

<SCRIPT language="JavaScript">
<!--

document.write("The background color is "+document.bgColor+"<BR>");

//-->
</SCRIPT>

</BODY>

</HTML>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Document
» bgColor