开发者

IE: input type="file" multiple

How come IE 9 does not support input type="file" multiple like other browsers do?

<form action="#" method="post" enctype="multipart/form-data">
  <input type="file" multiple name="uploads[]" />
  <input type="submit"/>
</form>

How can I make it work o开发者_如何学Cn IE?


Uploading multiple files is a specific part of HTML5 that none of the Internet Explorers support.


IE should support multiple according to this doc:

http://msdn.microsoft.com/en-us/library/ie/hh772307(v=vs.85).aspx

But even so, their own example does not work with IE9 for me..

<input type="file" multiple="multiple" onchange="for (var i = 0; i < this.files.length; i++) { document.write(this.files[i].name ) };" />

When the onchange event fires, the files property doesn't appear to exist for the HTMLInputElement in IE, whereas in Chrome it does.

Update: this doc apparently doesn't apply to IE9. IE 10 is said to support the File API. Let's hope it will be released soon.


You may use button that create additional inputs in IE.
It will work same as multiple input in other browsers(for your server).

Sure, users will should select every file one by one, but they use IE


I got it fixed by adding below metadata at the top of page after "Title" tag.

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

"IE=Edge" loads the latest version of IE version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜