1.得到localStorage
var storage = window.localStorage;
2.创建
storage.setItem("名称","值")
3.获取
storage.getItem("名称")
4.删除
storage.removeItem("名称")
5.清空所有
storage.clear() ;
1.得到localStorage
var storage = window.localStorage;
2.创建
storage.setItem("名称","值")
3.获取
storage.getItem("名称")
4.删除
storage.removeItem("名称")
5.清空所有
storage.clear() ;
转载于:https://www.cnblogs.com/-scl/p/7771846.html