📜  循环访问本地存储中的所有键 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:21.733000             🧑  作者: Mango

代码示例1
let nextValue;
for (let i = 0; i < localStorage.length; i++){
    nextValue = localStorage.getItem(localStorage.key(i));
    //Do something with nextValue..
    //...
}