localStorage的存储,读取,删除

设置localStrage

window.localStorage.setItem('todo',suc.list_data);

获取localStrage

window.localStorage.getItem("todo")

意为读取key为todo的浏览器数据

删除某个localStrage的key

window.localStorage.removeItem('key')

清空本地所有的key

window.localStorage.clear()

为您推荐

评论已关闭