localStorage存取储数组。(存对象同理)

   var array = ['111','222','333','444','555'];


window.localStorage.setItem('array',JSON.stringify(array)); 取 array= JSON.parse(localStorage.getItem('array'));

 

转载于:https://www.cnblogs.com/autoXingJY/p/11429588.html

你可能感兴趣的:(json)