IE和本地文件读取 [英] IE and local file reading
问题描述
我刚看过mozilla文件API文件读取为
I've just watched the mozilla File API file reading as
new FileReader();
等。而且我必须要问IE是否有类似内容?
etc. and I must ask is there something like that for IE?
推荐答案
是的,你可以使用 ActiveX'FileSystemObject 。但是,每次运行代码时都会向用户显示一个确认框。有些用户可能不信任您,可能选择不运行ActiveX控件。
此外,请注意,有些用户还使用不支持FileReader的非IE浏览器(Safari,旧版本的Firefox等)。通过添加ActiveX,您仍然不会100%支持与文件相关的API。
Yes, you can use ActiveX' FileSystemObject. However, an confirmation box is shown to the user everytime he runs the code. Some users might not trust you and could choose not to run the ActiveX control. Also, please note that some users also use non-IE browsers which don't support FileReader (Safari, older versions of Firefox and so on). By adding ActiveX, you still won't have 100% support for file-related APIs.
这篇关于IE和本地文件读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!