如何使用JavaScript在客户端创建存储文件? [英] How can I create a file for storage on the client side with JavaScript?

查看:504
本文介绍了如何使用JavaScript在客户端创建存储文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个临时文件来存储客户端的用户设置。是否可以使用JavaScript创建一个简单的日志文件?

I need to create a temporary file to store user settings on the client side. Is it possible to create a simple log file using JavaScript?

推荐答案

您有几个选择:


  • Cookies

  • localStorage

  • 数据库

检查此链接:

  • HTML5: Client-side Storage

只能在使用ActiveX对象的IE中创建文件。

Creating a file is possible only in IE using ActiveX objects.

这篇关于如何使用JavaScript在客户端创建存储文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆