BLHteacher | Resources | Project
Changing the document's Background Color
The
document
object has several color properties that can be set; one of them is thebgColor
object.The
bgColor
object can be be set even after the document has loaded. This is done by assigning it a six digit hexidecimal RGB string value or one of the predefined JavaScript color values.For example, the following HTML/JavaScript code will create two form buttons in the document. When pressed, the first button will immediately change the document background color to black. The second will change it to yellow:
Fading the document's Background Color
© 2000 BLHteacher. All rights reserved.