title: JavaScript onClick button adds textarea into particular div elements
body: <p>I am obviously missing something. I need this addmore button to add textarea into the div for the particular question, not only the first one. I can make it complicate, but I hope there is an easy solution.</p>
  
  <p><a href="http://jsfiddle.net/b3Mr7/" rel="nofollow">Fiddle</a></p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>1.Question:&lt;br/&gt;
  &lt;textarea name="odg1" rows="1" cols="50" &gt;&lt;/textarea&gt;&lt;br/&gt;&lt;div id="inner"&gt;&lt;/div&gt;&lt;button type="button" name="addmore" onClick="addmore();"&gt;Add more&lt;/button&gt;
  &lt;br/&gt;&lt;br/&gt;
  2.Question:&lt;br/&gt;
  &lt;textarea name="odg2" rows="1" cols="50" &gt;&lt;/textarea&gt;&lt;br/&gt;&lt;div id="inner"&gt;&lt;button type="button" name="addmore" onClick="addmore();"&gt;Add more&lt;/button&gt;
  &lt;br/&gt;&lt;br/&gt;
  </code></pre>
  
  <p><strong>addmore.js</strong></p>
  
  <pre><code>am = 1;
  function addmore() {
          var textarea = document.createElement("textarea");
          textarea.name = "odg" + am;
          textarea.rows = 1;
          textarea.cols = 50;
          var div = document.createElement("div");
          div.innerHTML = textarea.outerHTML;
          document.getElementById("inner").appendChild(div);
          am++;
  }
  </code></pre>