localStorage 数组的存储和提取

原创 telephonetoo 随笔 jQuery 57阅读 16 天前 举报

searchArry.push(matchContentVal);
localStorage.setItem('searchArry',JSON.stringify(searchArry));


var searchArry = [];
var weekArray = JSON.parse(localStorage.getItem('searchArry'));

for (var i in weekArray) {
searchArry.push(weekArray[i]); //属性
}

searchArry.slice(-3)

评论 ( 0 )
最新评论
暂无评论

赶紧努力消灭 0 回复