title: Input box to change the background color of a webpage using javascript
body: <p>On my web page I have JavaScript script that changes the background color. My HTML is:  </p>
  
  <pre><code>&lt;a href="#" onclick="javascript:changeBGC('#FFFFFF')"&gt;White&lt;/a&gt; 
  </code></pre>
  
  <p>My Javascript function is:  </p>
  
  <pre><code>    function changeBGC(color){
          document.bgColor = (color);
      }
  </code></pre>
  
  <p>How can I change the color of the background getting the color from an <code>&lt;input&gt;</code> box instead of putting a predefined value?</p>