Article introduction of Wulin.com (www.vevb.com): In the past, when uploading files, we could only select one file at a time. If you want to implement multiple file uploads, you either dynamically add the file box or use Flash instead. Now it is easy for us to implement this function in HTML5.
In the past, when uploading files, we could only select one file at a time. If you want to implement multiple file uploads, you either dynamically add the file box or use Flash instead. Now it is easy for us to implement this function in HTML5.FileList object:
FileList object is actually a list of multiple file objects. In HTML5, if you want to upload multiple files, we only need to add the multiple attribute to the original file type Input.
HTML
JavaScript
In order to let everyone see this upload text box clearly, I simply wrote about JS and used it to traverse the files in the filelist. It doesn't matter if JS doesn't understand it. This is mainly to demonstrate that this control does get multiple files.
Complete code