- 数据存储在用户浏览器中,其实是保存在硬盘中
- 页面刷新不丢失数据
- sessionStorage和localStorage约 5M 左右
localStorage.setItem(key, value)
localStorage.getItem(key)
localStorage.removeItem('uname')
localStorage.setItem(key, value)
localStorage.getItem(key)
localStorage.removeItem('uname')