JavaScript Reference/Javascript Properties/bgColor
"bgColor" Example
<source lang="javascript">
<html> <head> <script>
function function1() { document.all.myCell.bgColor = "red"; } function function2() { document.all.myCell.bgColor = ""; }
</script> </head> <body bgcolor="#EEEEEE">
Cell 1 content | Cell 2 content | Cell 3 content | Cell 4 content | Cell 5 content | Cell 6 content | Cell 7 content |
<input type="button" value="Add background color to Cell 1" onClick="function1();"> <input type="button" value="Remove background colors" onClick="function2();"> </body> </html>
</source>
"bgColor" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<body> document |
| |<marquee>| | |<tfoot> | | | |<thead> |
---|