The LocalStorage class is used for data storage without time limit.
LocalStorage
LocalStorage 类用于没有时间限制的数据存储。
静态
The number of items.
Retrieves the number of items stored in local storage.
获取本地存储中存储的项目数量。
Clears all locally stored information.
清除所有本地存储的信息。
The key name.
The string value associated with the key.
Retrieves the value for the specified key.
获取指定键名的值。
The Object value associated with the key.
Retrieves the Object value for the specified key.
获取指定键名对应的 Object 类型值。
Removes the item associated with the specified key.
删除指定键名的信息。
The value to store.
Stores a key-value pair as strings.
存储指定键名和键值,字符串类型。
The value to store. It's an Object type and will be converted to a JSON string for storage.
Stores a key-value pair where the value is an Object.
存储指定键名及其对应的 Object 类型值。
En
The
LocalStorage
class is used for data storage without time limit.Zh
LocalStorage
类用于没有时间限制的数据存储。