开发者

How can I get file from input in IE8?

开发者 https://www.devze.com 2023-03-12 13:20 出处:网络
How I can get file in IE(8) like this: <input id=\"files\" type=\"file\"> 开发者_高级运维<script>

How I can get file in IE(8) like this:

<input id="files" type="file">

开发者_高级运维<script>
    var file = this.files[0]; //(FF, Chrome)
</script>

for uploading?


You can't.
IE8 doesn't support this feature.


Native file input boxes do not have the files attribute in IE8. However when the user selects a file its URL becomes the value of the input element, so there is no problem to retrieve it.

0

精彩评论

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