phonegap系列之API(2)localStorage

phonegap系列之API(二)localStorage?? pg提供对W3C Storage接口的访问:?var storage window.localStorag

phonegap系列之API(二)localStorage

?

? pg提供对W3C Storage接口的访问:

?

var storage = window.localStorage;

?

? ? 方法:

?

key ? ? ? ? ? ? ? ? ? ?返回指定位置的键的名字getItem ? ? ? ? ? ? ?返回指定键对应的值setItem ? ? ? ? ? ? ? 存储一个键值对removeItem ? ? ? ?删除指定的键对应的值clear ? ? ? ? ? ? ? ? ? 删除所有的键值对

?

? ?移动端支持情况:

?


? ? ?phonegap系列之API(2)localStorage
?

?

? ?注释:

?

? ? ?如果没有,返回的多是null

?

?

? ?扩展阅读:

?

? ?http://zhangyaochun.iteye.com/blog/1405451

?