How do I upload multiple files using HTML? I search Chinese how also can not find the appropriate, is to use JS dynamic add input, and then submit, do not meet what I want--open the window to select files to select multiple files at once.
Then I try to search the English "HTML input file multiple", finally found an article in StackOverflow: http://stackoverflow.com/questions/1175347/ how-can-i-select-and-upload-multiple-files-with-html-and-php-using-http-post/8808915#8808915, you can do it.
However, there is a problem, only support ie10+, even IE9 are not supported, O (︶^︶) o
In fact the method is very simple <input type= "file" name= "upload" > This can only select one file, <input type= "file" multiple name= "upload" > So you can select multiple files, how, very convenient. If you don't consider IE, you can use this method. About JS self-generated a number of input on it, too lazy to read, lazy writing, can be simple.
Yes, there is an important question, <input type= "file" multiple> select multiple files, how to use jquery to get the title of the selected file and other properties? jquery does not seem to have such a method, but the native JS has, can write:
document.getElementById ("file"). Files[1].name
where document.getElementById ("file"). Files gets an array of the properties of the elements in the array that have lastmodifieddate, name, size, type, Webkitrelativepath.
Upload multiple files using the <input> tag in HTML (GO)