1.得到localStorage
var storage = window.localStorage;
2.创建
storage.setItem("名称","值")
3.获取
storage.getItem("名称")
4.删除
storage.removeItem("名称")
5.清空所有
storage.clear() ;
持久化的本地存储,localStorage
原文:http://www.cnblogs.com/-scl/p/7771846.html