why does “HTML file select” changes the order of selected files and sort them alphabetically?
问题 I am trying to get the name of the files that are selected by a "file" input in HTML: <input type="file" class="filestyle" name="file-select[]" id="file-select" accept="image/*" multiple> I wrote this JavaScript code to do that: $('#file-select').on("change", function(){ var selectedFiless = this.files; for (var i = 0; i < selectedFiless.length; ++i) { var name = selectedFiless.item(i).name; alert(name); } }); However, I noticed that the names are sorted in alphabetical order, not in