标签:clear session 添加 覆盖 name tor local rem storage
local storage
1.添加
localStorage.name = ‘xiaoyi‘;//存
sessionStorage.name = ‘lili‘;//存
sessionStorage.setItem(‘name‘,‘lili‘);//存
存一样的会被覆盖
2.获取
sessionStorage.name;//获取
sessionStorage.getItem(‘name‘);//获取
-------------------------------------------------------------
3.删除
sessionStorage.name.removeItem();
全部删除
sessionStorage.clear();
localStorage.clear();
标签:clear session 添加 覆盖 name tor local rem storage
原文地址:https://www.cnblogs.com/shaozhu520/p/8976032.html