Javascript Reference
Categories: BODY

javascript BODY bgColor

@July 1, 2009, 4:26 a.m.
bgColor Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

 

Read/Write  

Provides the background color of the element. Even if the bgcolor attribute or bgColor property is set with a plain-language color name, the returned value is always a hexadecimal triplet.

 
Example
 
document.body.bgColor = "yellow";
 
Value

A hexadecimal triplet or plain-language color name. See acceptable plain-language color names.

 
Default

Varies with browser and operating system.


Powered by Linode.