javascript - 打开一个 js 变量的保存文件对话框

标签 javascript save google-docs

在我的网络应用程序中,我需要为用户提供将 js 变量保存为文件的选项(当用户点击下载时,应用程序会建议他保存文件,最好是 .js 文件)。

类似于 google docs 为您提供保存文件的功能。

javascript 是否可以通过这种方式传递它的变量?

最佳答案

查看 Downloadify这正是允许的。

Downloadify is a tiny JavaScript + Flash library that enables the generation and saving of files on the fly, in the browser, without server interaction.

不过,它需要在用户的浏览器中安装 Flash 才能工作。

如果没有服务器交互,我知道没有其他方法可以做到这一点。

关于javascript - 打开一个 js 变量的保存文件对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2980569/

相关文章:

python - PIL 保存时改变像素值

java - 需要帮助将链接列表实现到 TableView javaFX 并将其保存到文件中

c# - ASP.NET 将响应保存到 global.asax 中的文件

google-docs - 监控 Google Docs 上的 View 统计信息

sharepoint - WebEx WebOffice的开源替代品?

javascript - 如何取消 API 响应中的字符转义?

javascript - 在串联期间如何管理依赖关系?

javascript - typescript + jQuery : correct way to use event state?

javascript - 在 HTML 选择列表中选择选项时的 HTML 垂直居中选择

Excel 公式转 Google 文档格式