title: How to dynamically add new input fields to my page
body: <p>I'm trying to append a new input field on the click of a button.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var div = document.getElementById('row');      
    document.getElementById('create_row').onclick = function (e) {
    div.innerHTML = div.innerHTML + '&lt;input type="text" name="ain[]" placeholder="something..."/&gt;';
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="row"&gt;&lt;/div&gt;
  &lt;button type="button" id="create_row"&gt;button&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This appears to be is working great! But every time I press the button, the added field contents is disappearing.</p>
  
  <p>So, I want to leave the added field's contents in place.</p>
  
  <p>Help! ㅠ_ㅠ</p>