在javascript中打开/保存文件 [英] Open/Save file in javascript
本文介绍了在javascript中打开/保存文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将编写一个应用程序,需要让用户加载PNG和JSON文件,然后保存。
I'll write an app that'd need to let user load PNG&JSON files and then save them.
我如何让用户打开并保存文件?
How could I let user open and save such files? I wouldn't like to write up an echo server for those images.
推荐答案
您可以使用File API加载文件(仅支持in firefox 3.6 and chrome unstable(might beta)at the moment):
You can load files with File API (only supported in firefox 3.6 and chrome unstable (maybe beta) at the moment):
http://dev.w3.org/2006/webapi/FileAPI/
目前没有办法保存文件
这篇关于在javascript中打开/保存文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文