1.获取localStorage的长度:window.localStorage.length
2.添加/编辑localStorage的内容:window.localStorage.setItem(键,值);