开发者

How can I get file from input in IE8?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜