title: Getting an element by id every time I loop through
body: <p>So my issue is, whenever I run this loop, it only grabs the changes to the element on the first flip through. Is there a way to make it make those changes every time? </p>
  
  <pre><code>&lt;script&gt;
  for ( i=0; i&lt;5; i++){
      document.write('&lt;div id=\"blah\" &gt;text&lt;/div&gt;');
      var b = document.getElementById("blah"); 
      b.style.width ="200px";      
      b.style.backgroundColor="yellow";
  }
  &lt;/script&gt;
  </code></pre>