title: Appending a new textbox onclick of button
body: <p>Am trying to write a simplest code, like onclick of button a new textbox with unique id should be assigned and appended to the existing ones.</p>
  
  <pre><code>function appendRow()
  {
  var x = 1;
  for(var i=0; i &lt; x; i++)
  {
      var d = document.getElementById('div');
      d.innerHTML = "&lt;input type='text' id='tst"+ x +"'&gt;&lt;br &gt;";
  }
  ++x;
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="div"&gt;
   &lt;button onclick ="appendRow()" value="Add Row"&gt;Add Row&lt;/button&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>This might be very simple for techies.</p>
  
  <p>Thanks.</p>