本地JavaScript-写入本地文件 [英] Local JavaScript - write to local file
本文介绍了本地JavaScript-写入本地文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些从本地HTML文件加载的JavaScript代码(无需通过网络服务器)..即,使用file://
I have some JavaScript code loaded from a local HTML file (without going through a webserver).. i.e., opened using file://
该文件中的JavaScript代码是否可以用于写入本地文件?
Is there a way the JavaScript code in this file can be used to write to a local file?
我知道跨站点限制不允许在JavaScript中做很多事情,但这不是跨站点的,因此从理论上讲应该允许.
I know that cross-site restrictions do not allow lot of things in JavaScript, but this is not cross-site, so it should be allowed in theory.
推荐答案
有一个jQuery插件 jQuery.twFile ,使您可以读写本地文件.
There's a jQuery plugin jQuery.twFile that allows you to read and write to a local file.
这篇关于本地JavaScript-写入本地文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文