A concept
sessionStorage: session-level browser local storage
localStorage: browser local storage, do not close the page with the deleted data
Two principles
Three use
1) Use
setItem(key,value);添加本地存储数据
getItem(key);通过key获取相应的value
removeItem(key);通过key删除本地数据
clear();清空数据
sessionStorage, localStorage method of use are the same
2) View
In the browser, press F12, click on the application to view