浏览器 - 文件扩展名的作家? [英] Browser - file writer extension?

查看:195
本文介绍了浏览器 - 文件扩展名的作家?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有允许JavaScript客户端的PC创建写入文件?任何Chrome或Firefox扩展

Is there any chrome or firefox extension that allows javascript to create write files in client's PC?

推荐答案

那你想干什么?

HTML5拥有文件API 。这是最好的解决方案,因为它允许将文件的选择是完全用户控制。

HTML5 has a File API. This is the best solution because it allows selection of the file to be wholly under user control.

如果你一定要,你可以使自己的 NPAPI 插件,暴露自己的脚本(又名 NPRuntime 的),进行关于在页面代表的Javascript天然本​​地文件操作。或者,在IE浏览器,新的ActiveXObject(Scripting.FileSystemObject的)可能产生的 FileSystemObject的 (取决于ActiveX设置)。但请不要。

If you must, you can make your own NPAPI plugin which exposes itself to scripting (aka NPRuntime) and performs native local file operations on behalf of Javascript in the page. Or, in IE, new ActiveXObject("Scripting.FileSystemObject") may yield a FileSystemObject (depending on ActiveX settings). But please don't.

这篇关于浏览器 - 文件扩展名的作家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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