title: How to dynamically add multiple textboxes in a loop
body: <pre><code>var addquestion=$(document.createElement('div')).attr("id",'questionp'+c);
  /* ... */
  for(var i=1; i&lt;=a.value; i++)
  {
    addquestion.after().html('&lt;label&gt;Q'+c+'.&amp;nbsp;'+q+'&lt;/label&gt; &lt;br /&gt; &lt;input type="'+sel.value+'" name="fanswer" id="fanswer" value="'+answ+'"&gt;'+answ+'');
    addquestion.appendTo("#question");
  }
  </code></pre>
  
  <p>This is my for-loop code of JavaScript. I want to multiple text boxes in same div, but it only adds a single textbox.</p>