//获取值
localStorage.getItem("xx");
//赋值
localStorage.setItem("xx",val);
//循环获取值
for(var i=0; i<localStorage.length; i++){
//localStorage.key(i)
localStorage.getItem(localStorage.key(i))
}
localStorage 使用
最新推荐文章于 2022-07-21 11:27:08 发布
//获取值
localStorage.getItem("xx");
//赋值
localStorage.setItem("xx",val);
//循环获取值
for(var i=0; i<localStorage.length; i++){
//localStorage.key(i)
localStorage.getItem(localStorage.key(i))
}