javascript - 如何使用 <input type ="file"> 选择多个文件?

标签 javascript html file-upload

如何使用 <input type="file"> 选择多个文件?

最佳答案

新答案:

在 HTML5 中,您可以添加 multiple属性选择多个文件。

<input type="file" name="filefield" multiple="multiple">

旧答案:

You can only select 1 file per <input type="file" />. If you want to send multiple files you will have to use multiple input tags or use Flash or Silverlight.

关于javascript - 如何使用 &lt;input type ="file"> 选择多个文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1593225/

相关文章:

javascript - AngularJS 与 jQuery 用于选择父元素

javascript - 使用 JQuery 获取 itemprop 的 href 值

javascript - 将隐藏字段值替换为 NoUiSlider 值的值以传递给 PHP 表单

html - 在中心容器内 float 左 div

asp.net-mvc - 从mvc中的FormCollection值中获取Fileupload值

上传大于 2 MB 的文件时 Apache 文件上传异常

javascript - 追加和清空大型列表时的性能

javascript - CSS 列 : both fluid and flexible in width

javascript - 多个动态 Canvas 元素?

php - 如何获取点击了哪个元素的表单对象