change background color document with javascript
<p>I am using the following code : </p>

<pre><code>    &lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="WebApplication3.Site1" %&gt;

&lt;!DOCTYPE html&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;link href="style.css" rel="stylesheet" /&gt;
    &lt;script type="text/javascript"&gt;

        function change(color) {
            document.bgColor = color;
        }

    &lt;/script&gt;
    &lt;asp:ContentPlaceHolder ID="head" runat="server"&gt;
    &lt;/asp:ContentPlaceHolder&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;

        &lt;p&gt;&amp;nbsp;&lt;/p&gt;
        &lt;div class="green"&gt;
            &lt;div id="slatenav"&gt;
                &lt;ul&gt;
                    &lt;li&gt;&lt;a href="WebForm3.aspx" id="green" onclick="change('green')"&gt;Home&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a href="WebForm4.aspx"  id="red" onclick="change('red')"&gt;About Us&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div&gt;
            &lt;asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"&gt;
            &lt;/asp:ContentPlaceHolder&gt;
        &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Why it isn't working properly?</p>
