title: Change document background image in javascript function
body: <p>I want to change the html documents background image in a javascript function but I'm having some difficulty with it. This is what I have:</p>
  
  <pre><code>function changeBgImage(){
  
      document.background = "url('images/SecondBackground.png')";
  
  }
  </code></pre>
  
  <p>But as I said, not working.. Any ideas?</p>