/**
* 全局ShareObject管理器
* location shareobject manager
* @author hengry
*/
public final class yfqian_SaveALoad
{
public static function set(key:String, value:String):String
{
LocalStorage.setItem(key,value);
return value;
}
public static function get(key:String):String
{
return LocalStorage.getItem(key);
}
public static function del():void
{
LocalStorage.clear();
}
public static function kill(key:String):void
{
LocalStorage.removeItem(key);
}
}
}
本地数据存储
3 个回复
seacole
赞同来自: 假装不食烟火
叮当(H5研发)
赞同来自:
package yfqian.yfqian_save
{
import laya.net.LocalStorage;
/**
* 全局ShareObject管理器
* location shareobject manager
* @author hengry
*/
public final class yfqian_SaveALoad
{
public static function set(key:String, value:String):String
{
LocalStorage.setItem(key,value);
return value;
}
public static function get(key:String):String
{
return LocalStorage.getItem(key);
}
public static function del():void
{
LocalStorage.clear();
}
public static function kill(key:String):void
{
LocalStorage.removeItem(key);
}
}
}
本地数据存储
seacole
赞同来自:
localStorage.getItem("key");