如何在JavaScript中将变量的内容写入文件 [英] how to write a variables's content to a file in JavaScript
本文介绍了如何在JavaScript中将变量的内容写入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
考虑JavaScript代码:
Consider the JavaScript code:
var body=" ";
body=body+/*some string*/
我想用一些简单的方法来写这个内容(此代码中为 var body
)到本地计算机中的文件。
I want some simple way to write this content (var body
in this code) to a file in local computer.
请帮我解决这个问题工作。
Please help me out in doing this job.
谢谢
推荐答案
由于安全限制你不能使用Javascript写本地文件。
Due to security restrictions you can not write local files using Javascript.
这篇关于如何在JavaScript中将变量的内容写入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文