title: JavaScript - how to change checkbox background?
body: <p>I want to change background of checkbox without using jQuery (if is that possible of course), because I'm not familiar with that library.</p>
  
  <p>HTML:</p>
  
  <pre><code>    &lt;form name="checkBox"&gt;
          &lt;input onchange="checkbox()" type="checkbox" class="cbox" /&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function checkbox(){
      var checkbox = document.getElementByClass('cbox');
      if(document.getElementById('cbox').checked === true){
          checkbox.style.background = "url('uncheck.png')";
      }else{
          checkbox.style.background = "url('check.png')";
      }
  }
  </code></pre>