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"]);