HTML 5文件API [英] HTML 5 File API

查看:130
本文介绍了HTML 5文件API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说Firefox 3.6增加了对HTML本地文件API的支持(在此发布)。

I hear that Firefox 3.6 adds support for the HTML local file API (Announcement here).

这是否意味着我可以从JavaScript访问本地文件?

Does this mean that I can access local files from javascript?

有人能指出我读取/写入本地文件的例子吗?

Can anyone point me to examples for reading / writing local files?

我希望能够读取/写入简单的文本文件。

I would love to be able to read / write simple text files.

推荐答案

您可以访问的唯一文件是从桌面删除的文件或从< input /> 标记中选择的文件。看看我在这里写的演示: http://hacks.mozilla .org / 2009/12 / uploaded-files-with-xmlhttprequest /

The only files you can access are files dropped from the desktop or files that has been selected from an <input/> tag. See the demo I've written here: http://hacks.mozilla.org/2009/12/uploading-files-with-xmlhttprequest/

这篇关于HTML 5文件API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆