window.localStorage;
时间: 2024-05-08 08:07:13 浏览: 119
local-storage-proxy:使用window.localStorage,就像它是一个对象一样
The window.localStorage property allows you to store key/value pairs in the browser's local storage. This data remains available even after the browser is closed or the user navigates away from the website. The localStorage object can be accessed via the global window object, and can be used to store data such as user preferences, session data, and other application-specific data. The data is stored as strings, so you will need to use JSON.stringify() and JSON.parse() methods to convert objects into strings and vice versa. The localStorage property can be used in both JavaScript and HTML5.
阅读全文