Javascript Document.bgColor does not work
Posted
by Icarus
on Stack Overflow
See other posts from Stack Overflow
or by Icarus
Published on 2010-04-21T20:57:10Z
Indexed on
2010/04/21
21:03 UTC
Read the original article
Hit count: 286
JavaScript
Hi,
In the below code, I get the two dialog boxes, but the bgColor of the page is never changed. Is there any standard that font / color changes are not honored in JavaScript ?
<html>
<head>
</head>
<body bgColor="GRAY">
<script type="text/javascript">
document.write("This message is written by JavaScript");
alert('Am here');
alert('Am here again');
document.bgcolor="WHITE";
</script>
</body>
</html>
© Stack Overflow or respective owner