1.sessionstorage存储数组
存储:
var testInfo= {
'testCname' : 'tes',
'testValue' : 'jajajajajaj',
}
sessionStorage.setItem("loginInfo",JSON.stringify(testInfo));
取出数据:
var testInfo = JSON.parse(sessionStorage.getItem("testInfo"));
var testCname = testInfo.testCname;
var testValue = testInfo.testValue;
删除数据
sessionStorage.removeItem('testInfo');