Never Nop Tech

Never Nop Tech

分享軟體、旅遊、生活。

javascript localstorage store Array

localstorage存陣列

範例如下:

var names = [];
names[0] = prompt("New member name?");
localStorage["names"] = JSON.stringify(names);


var storedNames = JSON.parse(localStorage["names"]);