WEB/js/store.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
if (!('localStorage' in window)) {
window.localStorage = (function () {
var documentElement, isIE = !!document.all;
if (isIE) {
documentElement = document.documentElement;
documentElement.addBehavior('#default#userdata');
}
return {
setItem: function (key, value) {
if (isIE) {
documentElement.setAttribute('value', value);
documentElement.save(key);
}
else {
window.globalStorage[location.hostname][key] = value;
}
},
getItem: function (key) {
if (isIE) {
documentElement.load(key);
return documentElement.getAttribute('value');
}
return window.globalStorage[location.hostname][key];
},
removeItem: function (key) {
if (isIE) {
documentElement.removeAttribute('value');
documentElement.save(key);
}
else {
window.globalStorage[location.hostname].removeItem(key);
}
}
};
})();
}
//写入
//localStorage.setItem('name', 'Joe');
//读取
//localStorage.getItem('name');
//删除
//localStorage.removeItem('name');
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
