1. 程式人生 > >localStorage儲存json物件

localStorage儲存json物件

localStorage.setItem(att)會自動將att儲存成字串形式,如:

var arr=[1,2,3];
localStorage.setItem("temp",arr);
typeof localStorage.getItem("temp");會返回String
local......