title: Prototype: add/remove input element
body: <p>I'm creating file(images) upload form.
  I want to add input elements by clicking on button. </p>
  
  <p>This is my input:</p>
  
  <pre><code>&lt;input type="file" name="file"/&gt;
  </code></pre>
  
  <p>I've alerady write some code:</p>
  
  <pre><code>        &lt;script language="javascript"&gt;
  fields = 0;
  function addInput() {
  if (fields &lt; 10) {
  document.getElementById('text').innerHTML += "&lt;input type="file" name="file"/&gt;&lt;br /&gt;";
  fields += 1;
  } else {
  document.getElementById('text').innerHTML += "&lt;br /&gt;Only 10 upload fields allowed.";
  document.form.add.disabled=true;
  }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>But it's ugly and not works...</p>
  
  <p>I have prototype library and want to use it to add inputs.</p>
  
  <p>So i need a button to add given inputs and on more button near every input to remove it - like when you attaching files to your mail.</p>