title: Get the files chosen using the input type file (multiple) and store them in an array
body: <p>In my HTML i select multiple files.</p>
  
  <pre><code>&lt;input type="file" id="img" multiple&gt;
  </code></pre>
  
  <p>I want to store each element in an array so that i can print the file source.</p>
  
  <p>I have done this in my javascript but it does not work.</p>
  
  <pre><code>function loadfiles()
  {
  var x=document.getElementById("img");
  for (var i=0;i&lt;x.length;i++)
  {
    document.write(x.elements[i].src);
  }
  }
  </code></pre>