title: Get checked checkboxes inside an element
body: <p>i have a <code>&lt;div id="myDiv"&gt;</code> containing a few <code>&lt;input type="checkbox"&gt;</code> and <code>&lt;br/&gt;</code>.
  Now i want to loop through all elements of the div and do something if the element is a checkbox and checked. i have already tried</p>
  
  <pre><code>var e = document.getElementById("myDiv");
  var c;
  for(c in e.children){
      if(c.checked) {
          //...
      }
  }
  </code></pre>
  
  <p>but <code>c.checked</code> is always undefined.
  Can anyone tell me how i do that?</p>