localstorage 得到的是对象,我们打算改对象的某个属性的值,方法是 通过临时变量对象得到,改变临时变量,然后把临时变量给localstorage的方法
var localS = window.localstorage.getItem('student');
var temp = localS;
temp['tel'] = 987654321;
window.localstorage.setItem('student',temp);
切记不能使用 以下方法
var localS = window.localstorage.getItem('student');
localS['tel'[ = 987654321;