vm.indexdata.indexId = id; vm.indexdata.indexName = name; var tempIndex = JSON.stringify(vm.indexdata); window.sessionStorage["searchIndex"] = tempIndex; //调用取值 JSON.parse(window.sessionStorage.getItem("searchIndex")).indexId JSON.parse(window.sessionStorage.getItem("searchIndex")).indexName) //判断session是否存在 if (window.sessionStorage["searchIndex"]) { } //移除session window.sessionStorage.removeItem("searchIndex");
前端session存储实例
最新推荐文章于 2024-07-25 20:09:36 发布