开发者

Working with localstorage

I am building an online os and have an issue. Is it possible to add data to the current values ​​of the loc开发者_Python百科al storage object without removing the current values​​?


Kind of. All local storage variables (as far as I know. correct me if I'm wrong) are stored as strings. So "adding" a bit of data to a local storage variable could be done by appending it to the existing value. e.g.

localStorage["myHandle"] += "blah";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜