📌  相关文章
📜  如何在 localstorage reactjs 中存储数组 - Javascript 代码示例

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

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

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