title: Can't change background of div region using javascript?
body: <p>This should be so simple, but I'm making heavy weather of it.</p>
  
  <p>Div region set out as:</p>
  
  <pre><code>&lt;div class="maincontent"&gt;
  Stuff in my div
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS for that div:</p>
  
  <pre><code>.maincontent{
      height: 100%;
      background-size: 100%;
      margin-left:1%;
      margin-right:1%;
      font-size:16px;
  }
  </code></pre>
  
  <p>Then I have:</p>
  
  <pre><code>onLoad=changeBackground();    
  </code></pre>
  
  <p>But before that I have the function:</p>
  
  <pre><code>function changeBackground(){
      document.getElementByAnything('maincontent').style.backgroundColor="yellow";    
  }
  </code></pre>
  
  <p>I know its making the call to the function because if I put an alert box in there that shows. But no matter what combination of getElementBy I can't make any changes to the background? </p>
  
  <p>Please help as its driving me insane!</p>
  
  <p>TIA</p>