title: HTML DOM createElement in for loop
body: <p>when i want to addChild in the html with Dom,i want to insert some <br> in it, but i confused in the for loop.
  First time i try this:</p>
  
  <pre><code>&lt;div id="whitespaces"&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  window.onload = function() {
      var br = document.createElment("br")
      var wh = document.getElementById("whitespaces");
      for (var count = 1; count &lt; 11; count++){
          wh.appendChild(br);
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>And the result is i just get <strong>1 &lt; br></strong> in the  html.</p>
  
  <p>Then i try this:<br>
      
      
      window.onload = function() {</p>
  
  <pre><code>    var wh = document.getElementById("whitespaces");
      for (var count = 1; count &lt; 11; count++){
          wh.appendChild(document.createElement("br"));
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>In this i get <strong>10 &lt; br ></strong> in my html page.
  So why the 2's result is different? 
  <strong>The variable br not equal the document.createElment("br")?</strong></p>