是否有可能写入到使用JavaScript(在磁盘)的文件? [英] Is it possible to write to a file (on a disk) using JavaScript?

查看:144
本文介绍了是否有可能写入到使用JavaScript(在磁盘)的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手,中级程序员采取刺在阿贾克斯。虽然JavaScript的阅读,我发现它奇怪,大多数我已经吸取了使用PHP进行这种操作的例子。我知道你们许多人可能会说,我做错了或者JavaScript是一种客户端的语言等,但问题的立场。 。 。可你写一个文件中唯一的JavaScript?

I am a novice-intermediate programmer taking a stab at AJAX. While reading up on JavaScript I found it curious that most of the examples I've been drawing on use PHP for such an operation. I know many of you may argue that 'I'm doing it wrong' or 'JavaScript is a client-side language' etc. but the question stands. . .can you write a file in only JavaScript?

编辑:对不起,刚刚看了常见问题,没有提到这是我在#1的第一篇文章,而我希望我没有冠冕堂皇的议论,华而不实,或主观

Sorry, just read faq, failed to mention this my first post on Stackoverflow while I hope I'm not sounding argumentative, pompous, or subjective.

推荐答案

是的,你当然可以。这只是取决于什么API对象的JavaScript引擎向您提供。

Yes, of course you can. It just depends on what API objects your javascript engine makes available to you.

不过,赔率是JavaScript引擎,你正在考虑不提供此功能。绝对没有任何的主流浏览器将允许它。

However, odds are the javascript engine you're thinking about does not provide this capability. Definitely none of the major web browsers will allow it.

这篇关于是否有可能写入到使用JavaScript(在磁盘)的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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