How to set a HTML document's background color in JavaScript?
Using document object the back ground color can be changed by JavaScript.
The following example illustrates it. <html>
<body>
<script type="text/javascript">
document.body.bgColor="green";
</script>
</body>
</html>
How to set a HTML document's background color in JavaScript?
<script>
var color = '#F4F4F4';
function colorbackground(code)
{
document.bgColor = backColor[code];
}
</script>