我正在尝试使用HTML5本地存储跨页面处理会话对象,并且除了主页之外,Madding. 57
Crowning. 47
My. 8
And. 8
Thy. 7
Thou. 7
The. 5
To. 5
For. 5
I. 4
That. 4
In. 4
Love. 4
Is. 3
Not. 3
...
Did. 1
Shadows. 1
Of. 1
Mind,. 1
O'erlook. 1
Sometime. 1
Fairer. 1
Monsters,. 1
23. 1
Defect,. 1
Show,. 1
What's. 1
Wood. 1
So. 1
Lov'st,. 1
Length: 133, dtype: int64
和Local Storage
值都不会保留。问题是什么?
Session Storage
用户对象值仅存在于我的主页上,而其他页面返回为localStorage.setItem("users",JSON.stringify(userlist));
alert(localStorage.getItem("users"));
空值。
答案 0 :(得分:0)
请检查两个页面中的域for eg setting it in http://dev1.test.com & getting it in http://dev2.test.com won't work
,因为本地存储是特定于域的