开发者

Working with localstorage

开发者 https://www.devze.com 2023-03-23 02:10 出处:网络
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 loca

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

精彩评论

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