title: Javascript query selector
body: <p>i have a question about javascript selector, i have 3 div elements with same class. 
  and i wwat to change the color of second class. </p>
  
  <pre><code>    &lt;div class="box"&gt;
          Element1
      &lt;/div&gt;
  
      &lt;div class="box"&gt;
          Element2
      &lt;/div&gt;
  
      &lt;div class="box"&gt;
          Element3
      &lt;/div&gt;
  </code></pre>
  
  <p>i've tried following code : </p>
  
  <pre><code>var el = document.body.getElementsByTagName("div")[0].className;
  el.style.color = "green";
  </code></pre>
  
  <p>but it doesn't works. </p>
  
  <p>can you help me? 
  Thanks in advance. </p>