1.获取localStorage的长度:window.localStorage.length
2.添加/编辑localStorage的内容:window.localStorage.setItem(键,值);
3.根据对应的索引去获取对应localStorage的key的值:window.localStorage.key(索引);
4.根据对应的key获取对应的的value:window.localStorage.getItem(key);