title: JavaScript change color problem
body: <p>I've seen all the posts but my problem isn't that it doesn't change the background color but rather that it does and the change it but to the original. Here's the code.</p>
  
  <pre><code>    &lt;html&gt;
          &lt;head&gt;
              &lt;title&gt;Calculator&lt;/title&gt;
              &lt;link rel="stylesheet" type="text/css" href="color.css"/&gt;
              &lt;script type="text/javascript"&gt;
                  function calc(color){
                      //document.body.bgColor = color;
                     x=document.myForm
                     var val1=x.input1.value;
                     var val2=x.input2.value;
                     var val3=val1+"+"+val2;
                     if(eval(val3)&lt;0) return;
                      else{
  
                     alert("The result is "+eval(val3));
                      var bd = document.getElementById ('body');
                      bd.className="highlight";
                      return;
                      }
                  }
              &lt;/script&gt;
          &lt;/head&gt;
          &lt;body id="body" onload="changeBackground(red)"&gt;
              &lt;form name="myForm" onsubmit="calc(this)"&gt;
                  Enter 2 values to add ;)
                  &lt;input type="text" name="input1"&gt;
                  &lt;input type="text" name="input2"&gt;
                  &lt;input type="submit" value="Send Input"&gt;
              &lt;/form&gt;
          &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>    .hightlight{
         background-color: yellow;
      }
  </code></pre>
  
  <p>I understand that the function ends right before the end of the function. So how can I get it to hold the color?</p>