刷新页面后如何保留用户数据? [英] How to persist user data after refreshing the page?
本文介绍了刷新页面后如何保留用户数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个复选框和输入字段.选中其中任何一个或在输入字段中输入任何值后,即使刷新或更改URL位置后,我也需要保留这些数据.有人可以帮助我吗?
I have couple of check boxes and input fields. When any of them are checked or any value entered to the input fields, I need to persist these data even after refreshing or URL location change.Can someone help me?
推荐答案
您可以使用HTML5的localStorage
You can use localStorage of HTML5
http://www.w3schools.com/html/html5_webstorage.asp
这篇关于刷新页面后如何保留用户数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文