命名空间 localStorage
Defined in: jx.cookie.js.
Constructor Attributes | Constructor Name and Description |
---|---|
localStorage 名字空间
|
Method Attributes | Method Name and Description |
---|---|
<static> |
localStorage.clear()
清空 localStorage
|
<static> |
localStorage.getItem(name)
根据名字读取值
|
<static> |
localStorage.isSupports()
判断是否支持 localStorage
|
<static> |
localStorage.removeItem(name)
根据名字移除值
|
<static> |
localStorage.setItem(name, value)
设置一个localStorage
|
方法详解
<static>
localStorage.clear()
- 功能:
- 清空 localStorage
<static>
{String}
localStorage.getItem(name)
- 功能:
- 根据名字读取值
- 参数:
-
- {String} name
- 返回:
- {String}
<static>
localStorage.isSupports()
- 功能:
- 判断是否支持 localStorage
<static>
localStorage.removeItem(name)
- 功能:
- 根据名字移除值
- 参数:
-
- {String} name
<static>
localStorage.setItem(name, value)
- 功能:
- 设置一个localStorage
- 参数:
-
- {String} name
- {String} value