window.localStorage.getItem('键'); //getItem获取浏览器localStorage保存的键的值; window.localStorage.setItem('键','值'); //setItem保存键的值到浏览器的localStorage;