📜  json 解析数组本地存储 - Javascript 代码示例

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

代码示例1
var names = [];
names[0] = prompt("New member name?");
localStorage.setItem("names", JSON.stringify(names));

//...
var storedNames = JSON.parse(localStorage.getItem("names"));