多个文件选择并上传 [英] Multiple files select and upload
本文介绍了多个文件选择并上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< form action =这个代码是用来上传文件到服务器的method =postenctype =multipart / form-dataname =form1id =form1>
< label>上传文件< input type =filename =fileid =file/>< / label>
< label>< input type =submitname =buttonid =buttonvalue =Submit/>< / label>< / form>
这是开放的文件浏览器,让我选择一个文件,当我按下时提交文件发送到我的服务器。
我想知道是否有一种方法可以使多个文件选择。
解决方案您可以使用
多个
属性,如下所示: < input type =filemultiple />
要选择多个文件,您需要按 Ctrl
键,然后单击要添加的文件。
i am using this code for upload files to a server(in html):
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<label>upload file<input type="file" name="file" id="file" /></label>
<label><input type="submit" name="button" id="button" value="Submit" /></label></form>
It's open file browser and let me select a file,and when i press on Submit the file is sent to my server.
i wonder if there is a way to make multiple file select.
解决方案
You can use the multiple
attribute for that, like this:
<input type="file" multiple />
To select multiple files you need to press the Ctrl
key and click on the files you want to add.
这篇关于多个文件选择并上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文