问题描述
任何人都可以解释这是如何实现的吗?
我想在jquery中做类似的事情,而不使用flash小部件。
使您能够以本地方式进行。基本上,你可以将 multiple =multiple
属性添加到文件上传控件中:
< input multiple =multipletype =file... />
缺点:只能在Firefox,Chrome,Safari等现代浏览器中运行。 IE,甚至9版本都不支持这个多重上传功能。
否则,你必须依靠一些Flash或Java上传组件。
(编辑:更改为 multiple =multiple
,感谢)
Facebook has the ability to select multiple images in the file browser in its upload feature.
Can anyone explain how this is achieved?
I'd like to do something similar in jquery without the use of a flash widget.
The HTML5 File API enables you to do it natively. Basically you add the multiple="multiple"
attribute to the file upload control:
<input multiple="multiple" type="file" ... />
Disadvantage: Only runs in modern browsers like Firefox, Chrome, Safari. IE, even version 9 does not support this multiple upload.
Otherwise, you have to rely on some Flash or Java upload component.
(Edit: Changed to multiple="multiple"
, thanks to Ms2ger)
这篇关于Facebook风格的多图片上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!