目录结构调整
This commit is contained in:
30
codes/games/client/Projects/tgly/js/Storage.js
Normal file
30
codes/games/client/Projects/tgly/js/Storage.js
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
var storage = window.localStorage;
|
||||
|
||||
|
||||
function SaveData(key,data){
|
||||
storage.setItem(key,data);
|
||||
}
|
||||
function IsNull(key){
|
||||
if(storage.getItem(key)==null){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function ReadData(key){
|
||||
return storage.getItem(key);
|
||||
}
|
||||
function RemoveItemByKey(key){
|
||||
if(storage.getItem(key)!=null){
|
||||
storage.removeItem(key);
|
||||
}
|
||||
}
|
||||
function ClearStorage(){
|
||||
storage.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user