开发者

print to file javascript

开发者 https://www.devze.com 2023-02-07 00:17 出处:网络
I\'m wondering.. how could I output a string to a file (and create said file) in javascript? I\'m using t开发者_运维技巧his for Chrome extension development.You can\'t create, read, or modify files o

I'm wondering.. how could I output a string to a file (and create said file) in javascript?

I'm using t开发者_运维技巧his for Chrome extension development.


You can't create, read, or modify files on the computer using browser based client side Javascript for security reasons.


If you want to do this from within a browser, it won't work except you might use activex or java (via plugins).

Or you fetch yourself the spidermonkey (mozilla's javascript engine) source code and compile it into a command line application. You will get file access this way.

Cheers, -S


You post the info to a http handler (ashx in asp.net, or just a php site), which then writes the info to a file.

0

精彩评论

暂无评论...
验证码 换一张
取 消