function showType(fileInput) { var files = fileInput.files; for (var i = 0; i < files.length; i++) { var name = files[i].name; var type = files[i].type; alert("Filename: " + name + " , Type: " + type); } }