$(function () { test = []; var o = new Object(); o.id = 123; o.title = "ggg"; test.push(o); o.id = 444; o.title = "zzz"; test.push(o); console.log(test); console.log("========="); var r = localStorage.setItem('test',JSON.stringify(test)); //alert(r); aaa = localStorage.getItem('test'); console.log(JSON.parse(aaa)[0].id); })
localStorage & JSON
最新推荐文章于 2022-08-13 17:02:31 发布