设置key,value进行保存:
setLocalStorageString:function(key,value){
key="LS:"+key;
if(typeof this[key] === 'undefined' || undefined != this[key]){
sys.localStorage.setItem(key, value);
this[key]=value;
}
},
读取本地保存的key对应的value:
getLocalStorageString:function(key){
key="LS:"+key;
if(typeof this[key] === 'undefined')
this[key]=sys.localStorage.getItem(key);
return this[key];
},
删除本地key对应的value:
deleteLocalStorageString:function(key){
key="LS:"+key;
if(typeof this[key] === 'undefined' || undefined != this[key]) return;
sys.localStorage.removeItem(key);
delete this[key];
},