开发者

Can Ajax be used to manipulate client-side files?

Can Ajax be used to manipulate c开发者_开发技巧lient-side files? If so, how?


No, ajax (=javascript) is sandboxed, it cannot access anything on the computer where the browser is running except the browser. Imagine what would happen if you would surf on the web and suddenly the file C:\boot.ini is deleted :/


You can use javascript to do client-side file management if you have special permission from the browser (or other javascript-executing agent) to do so. One good way to get that is to have your script installed as part of a plug-in for Firefox or Chrome, using a toolkit such as Greasemonkey.

So, the answer is "yes, but ask for permission first!"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜