How to read and write into file using JavaScript?

后端 未结 17 2720
孤街浪徒
孤街浪徒 2020-11-22 02:00

Can anybody give some sample code to read and write a file using JavaScript?

17条回答
  •  执笔经年
    2020-11-22 02:41

    If you are using JScript (Microsoft's Javascript) to do local scripting using WSH (NOT in a browser!) you can use Scripting.FileSystemObject to access the file system.

    I think you can access that same object in IE if you turn a lot of security settings off, but that would be a very, very bad idea.

    MSDN here

提交回复
热议问题