title: Javascript onclick child
body: <p>I'm trying to do a simple onclick to child elements (without jQuery):</p>
  
  <pre><code>document.getElementById('link').children.onclick = function(){
      this.style.color="#ff0000";
  }
  </code></pre>
  
  <p>I want it to change the color to red for each element clicked. I would assume this method would work but it won't.</p>