title: Get input number value and loop to display text field
body: <p>I'm trying to create a form on a HTML/PHP page that get a given value in an input type number field, and display dynamically in the same page new input type text fields depending on the value of the previous number field.</p>
  
  <p>So in my form I have this :</p>
  
  <pre><code>&lt;label for="number"&gt;Number of servers&lt;/label&gt;
  &lt;input type="number" id="number" name="number" min="1" max="32" onkeydown="javascript: return event.keyCode == 69 ? false : true" placeholder="2" required tabindex="6"&gt;
  </code></pre>
  
  <p>When a user type i.e. 4, I would like that 4 new text field are displayed below.
  So I'm expecting to use a decremented DO...WHILE loop but I have no clue on how to do it.</p>
  
  <ul>
  <li>Best way to check change (onchange, onkeyup, onkeydown, ...) ? </li>
  <li>How to properly display new input text field (javascript, jquery, ...) ?</li>
  </ul>
  
  <p>Target is to have at the end something like this :</p>
  
  <pre><code>&lt;input type="text" id="server_name_1" name="server_name_1" maxlength="8" autocomplete="off" required tabindex="7"&gt; 
  &lt;input type="text" id="server_name_2" name="server_name_2" maxlength="8" autocomplete="off" required tabindex="8"&gt; 
  &lt;input type="text" id="server_name_3" name="server_name_3" maxlength="8" autocomplete="off" required tabindex="9"&gt; 
  &lt;input type="text" id="server_name_4" name="server_name_4" maxlength="8" autocomplete="off" required tabindex="10"&gt; 
  </code></pre>