<input type="file" id="myfile" multiple /> <script> document.querySelector('#myfile').onchange = function(e) { files = this.files; for(var a=0;a<files.length;a++) alert(files[a].name);} </script>