时间:2020-12-28 12:22:00 | 栏目:JavaScript代码 | 点击:次
read: function(key) {
if (!this._inited) {
throw new Error('Please initialize before reading.');
}
return this._data[key];
},
write: function(key, value) {
var str = [];
if (!this._inited) {
throw new Error('Please initialize before writing.');
}
this._data[key] = value;
for (var k in this._data) {
str.push(escape(k) + ':' + escape(this._data[k]));
}
window.name = str.join('|');
}
};