title: I'm Trying to get all button id's from a parent container and always get the last one
body: <p>I am trying to get a list of all ids from children from a parent container and I keep getting the last id only.  How can I get an array or string with all Ids?  These buttons will be dynamically created by PHP so I won't actually know what id will be there.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var childDivs = document.getElementById('onlineDrop').getElementsByTagName('button');
  for (var i = 0; i &lt; childDivs.length; i++) { 
  childDiv = childDivs[i].id;
  }
  alert(childDiv);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="onlineDrop"&gt;
  &lt;button id="222222"&gt;&lt;/button&gt;
  &lt;button id="333333"&gt;&lt;/button&gt;
  &lt;button id="444444"&gt;&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>No Jquery please.  Thanks in advance.</p>