Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

43. 您如何访问网络存储 #60

Open
webVueBlog opened this issue Jun 9, 2022 · 0 comments
Open

43. 您如何访问网络存储 #60

webVueBlog opened this issue Jun 9, 2022 · 0 comments

Comments

@webVueBlog
Copy link
Owner

Window 对象分别实现具有(window.localStorage) 和(window.sessionStorage) 属性的WindowLocalStorage和对象。这些属性创建一个 Storage 对象的实例,通过它可以为特定域和存储类型(会话或本地)设置、检索和删除数据项。例如,您可以对本地存储对象进行读写,如下所示WindowSessionStoragelocalStoragesessionStorage

localStorage.setItem("logo", document.getElementById("logo").value);
localStorage.getItem("logo");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant