存储Javascript变量客户端 [英] Store Javascript variable client side

查看:72
本文介绍了存储Javascript变量客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不重复:我已经阅读了很多像这样的问题,它总是使用PHP或服务器端的东西,并注意注入/数据操作。

Not duplicate : I've read many questions like this and it always ended up "use PHP or server-side stuff, and watch out for injection/data manipulation".

我想在客户端存储简单的东西(保存并加载),就像谷歌地图一样,并希望它保持在刷新页面之间。

I want to store simple stuff on the client side (save and load), like a Google Map location, and want it to stay between refresh of the page.

我不想使用PHP或任何服务器端的东西。

我该怎么办?

谢谢

推荐答案

Cookies localStorage

这篇关于存储Javascript变量客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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